Version =20 VersionRequired =20 Begin Form AllowFilters = NotDefault PopUp = NotDefault Modal = NotDefault RecordSelectors = NotDefault MaxButton = NotDefault MinButton = NotDefault ShortcutMenu = NotDefault AutoCenter = NotDefault NavigationButtons = NotDefault AllowDeletions = NotDefault DividingLines = NotDefault AllowAdditions = NotDefault DefaultView =0 ScrollBars =0 ViewsAllowed =1 BorderStyle =1 PictureAlignment =2 DatasheetGridlinesBehavior =3 GridY =10 Width =8163 DatasheetFontHeight =11 ItemSuffix =20 Left =3060 Top =2055 Right =13650 Bottom =10335 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x97e87bbff3d2e440 End Caption ="OpenAccess" DatasheetFontName ="Calibri" OnLoad ="[Event Procedure]" AllowDatasheetView =0 AllowPivotTableView =0 AllowPivotChartView =0 AllowPivotChartView =0 FilterOnLoad =0 ShowPageMargins =0 DisplayOnSharePointSite =1 AllowLayoutView =0 DatasheetAlternateBackColor =15921906 DatasheetGridlinesColor12 =0 FitToScreen =1 DatasheetBackThemeColorIndex =1 BorderThemeColorIndex =3 ThemeFontIndex =1 ForeThemeColorIndex =0 AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 Begin Begin Label BackStyle =0 FontSize =11 FontName ="Calibri" ThemeFontIndex =1 BackThemeColorIndex =1 BorderThemeColorIndex =0 BorderTint =50.0 ForeThemeColorIndex =0 ForeTint =50.0 GridlineThemeColorIndex =1 GridlineShade =65.0 End Begin CommandButton Width =1701 Height =283 FontSize =11 FontWeight =400 FontName ="Calibri" ForeThemeColorIndex =0 ForeTint =75.0 GridlineThemeColorIndex =1 GridlineShade =65.0 UseTheme =1 Shape =1 Gradient =12 BackThemeColorIndex =4 BackTint =60.0 BorderLineStyle =0 BorderColor =16777215 BorderThemeColorIndex =4 BorderTint =60.0 ThemeFontIndex =1 HoverThemeColorIndex =4 HoverTint =40.0 PressedThemeColorIndex =4 PressedShade =75.0 HoverForeThemeColorIndex =0 HoverForeTint =75.0 PressedForeThemeColorIndex =0 PressedForeTint =75.0 End Begin OptionGroup SpecialEffect =3 BorderLineStyle =0 Width =1701 Height =1701 BackThemeColorIndex =1 BorderThemeColorIndex =1 BorderShade =65.0 GridlineThemeColorIndex =1 GridlineShade =65.0 End Begin TextBox AddColon = NotDefault FELineBreak = NotDefault BorderLineStyle =0 Width =1701 LabelX =-1701 FontSize =11 FontName ="Calibri" AsianLineBreak =1 BackThemeColorIndex =1 BorderThemeColorIndex =1 BorderShade =65.0 ThemeFontIndex =1 ForeThemeColorIndex =0 ForeTint =75.0 GridlineThemeColorIndex =1 GridlineShade =65.0 End Begin ComboBox AddColon = NotDefault BorderLineStyle =0 Width =1701 LabelX =-1701 FontSize =11 FontName ="Calibri" AllowValueListEdits =1 InheritValueList =1 ThemeFontIndex =1 BackThemeColorIndex =1 BorderThemeColorIndex =1 BorderShade =65.0 ForeThemeColorIndex =2 ForeShade =50.0 GridlineThemeColorIndex =1 GridlineShade =65.0 End Begin Section CanGrow = NotDefault Height =2437 Name ="Détail" AlternateBackColor =15921906 AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 BackThemeColorIndex =1 Begin Begin Label OverlapFlags =85 TextAlign =2 TextFontFamily =49 Left =165 Top =60 Width =7845 Height =330 FontSize =12 FontWeight =700 BorderColor =8355711 ForeColor =8355711 Name ="lbl_title" Caption ="OpenAccess - Generate your Source Code" FontName ="Consolas" GridlineColor =10921638 LayoutCachedLeft =165 LayoutCachedTop =60 LayoutCachedWidth =8010 LayoutCachedHeight =390 ThemeFontIndex =-1 End Begin ComboBox LimitToList = NotDefault OverlapFlags =85 TextFontFamily =49 IMESentenceMode =3 ColumnCount =4 Left =170 Top =623 Width =2828 Height =390 FontSize =10 BorderColor =10921638 ForeColor =4138256 ColumnInfo ="\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"10\";\"100\"" Name ="cb_command" RowSourceType ="Table/Query" RowSource ="SELECT tbl_commands.cmd_name, tbl_commands.function, tbl_commands.description, t" "bl_commands.with_args FROM tbl_commands ORDER BY tbl_commands.order; " ColumnWidths ="5670;0;0;0" FontName ="Consolas" OnChange ="[Event Procedure]" GridlineColor =10921638 AllowValueListEdits =0 InheritValueList =0 LayoutCachedLeft =170 LayoutCachedTop =623 LayoutCachedWidth =2998 LayoutCachedHeight =1013 ThemeFontIndex =-1 End Begin CommandButton OverlapFlags =85 TextFontFamily =49 Left =7143 Top =623 Width =850 Height =390 TabIndex =2 ForeColor =4210752 Name ="cmd_run" Caption ="Run" OnClick ="[Event Procedure]" FontName ="Consolas" GridlineColor =10921638 LayoutCachedLeft =7143 LayoutCachedTop =623 LayoutCachedWidth =7993 LayoutCachedHeight =1013 UseTheme =0 BackColor =14136213 BorderColor =14136213 ThemeFontIndex =-1 HoverColor =15060409 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 WebImagePaddingLeft =2 WebImagePaddingTop =2 WebImagePaddingRight =1 WebImagePaddingBottom =1 Overlaps =1 End Begin Label OverlapFlags =85 TextFontFamily =49 Left =165 Top =1185 Width =7830 Height =735 FontSize =10 BorderColor =8355711 Name ="lbl_help" Caption ="Runs a git command" FontName ="Consolas" GridlineColor =10921638 LayoutCachedLeft =165 LayoutCachedTop =1185 LayoutCachedWidth =7995 LayoutCachedHeight =1920 ThemeFontIndex =-1 ForeTint =100.0 End Begin Label FontItalic = NotDefault OverlapFlags =85 TextAlign =3 TextFontFamily =49 Left =2040 Top =2040 Width =5949 Height =223 FontSize =8 BorderColor =8355711 Name ="Étiquette15" Caption ="Conseil départemental du Bas-Rhin, 2016" FontName ="Consolas" GridlineColor =10921638 LayoutCachedLeft =2040 LayoutCachedTop =2040 LayoutCachedWidth =7989 LayoutCachedHeight =2263 ThemeFontIndex =-1 ForeTint =100.0 End Begin TextBox OverlapFlags =85 TextFontFamily =49 IMESentenceMode =3 Left =3118 Top =623 Width =3860 Height =390 FontSize =10 TabIndex =1 BorderColor =10921638 ForeColor =4138256 Name ="txt_args" FontName ="Consolas" GridlineColor =10921638 LayoutCachedLeft =3118 LayoutCachedTop =623 LayoutCachedWidth =6978 LayoutCachedHeight =1013 ThemeFontIndex =-1 ForeThemeColorIndex =2 ForeTint =100.0 ForeShade =50.0 End End End End End CodeBehindForm Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Compare Database Private Sub cb_command_Change() Call update End Sub Private Sub cmd_run_Click() Call run End Sub Private Sub Form_Load() Call update End Sub Sub update() Me.lbl_help.Caption = Nz(Me.cb_command.Column(2), "") Me.txt_args.Enabled = Nz(Me.cb_command.Column(3), False) If Me.txt_args.Enabled Then Me.txt_args.SetFocus Else Me.cmd_run.SetFocus End If End Sub Sub run() Dim result As Variant If Not Me.txt_args.Enabled Then result = Application.run(Me.cb_command.Column(1)) Else result = Application.run(Me.cb_command.Column(1), Nz(Me.txt_args, "")) End If Call display_status(result) End Sub Private Sub display_status(result As Variant) On Error GoTo err Dim msg As String msg = "Operation ended with status: " & vbNewLine Select Case CInt(result) Case opCompleted msg = msg & "> Done" Case opInterrupted msg = msg & "> Interrupted" Case opCancelled msg = msg & "> Cancelled" Case Else GoTo err End Select MsgBox msg, vbInformation, "Open Access" Exit Sub err: MsgBox msg & "> (unable to read the returned status)", vbExclamation, "Open Access" End Sub