Version =20 VersionRequired =20 Begin Form DividingLines = NotDefault AllowDesignChanges = NotDefault RecordLocks =1 PictureAlignment =2 DatasheetGridlinesBehavior =3 GridY =10 Width =15193 DatasheetFontHeight =11 ItemSuffix =33 Right =10725 Bottom =12345 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x89b1c2c135d1e440 End RecordSource ="SELECT tbl_baremes.NomBareme, tbl_baremes.Commentaire, Max(tbl_PeriodeBareme.Dat" "eInf) AS MaxDeDateInf FROM tbl_baremes INNER JOIN tbl_PeriodeBareme ON (tbl_bare" "mes.PeriodeValidite = tbl_PeriodeBareme.CodePeriode) AND (tbl_baremes.NomBareme " "= tbl_PeriodeBareme.NomBareme) GROUP BY tbl_baremes.NomBareme, tbl_baremes.Comme" "ntaire; " OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" DatasheetFontName ="Calibri" PrtMip = Begin 0x6801000068010000680100006801000000000000201c0000e010000001000000 , 0x010000006801000000000000a10700000100000001000000 End FilterOnLoad =0 ShowPageMargins =0 DisplayOnSharePointSite =1 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 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 Subform BorderLineStyle =0 Width =1701 Height =1701 BorderThemeColorIndex =1 GridlineThemeColorIndex =1 GridlineShade =65.0 BorderShade =65.0 ShowPageHeaderAndPageFooter =1 End Begin FormHeader Height =1133 BackColor =12566463 Name ="EntêteFormulaire" AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 Begin Begin Label OverlapFlags =85 Left =566 Top =793 Width =1245 Height =315 BorderColor =8355711 Name ="Étiquette0" Caption ="NomBareme" GridlineColor =10921638 LayoutCachedLeft =566 LayoutCachedTop =793 LayoutCachedWidth =1811 LayoutCachedHeight =1108 ForeTint =100.0 End Begin Label OverlapFlags =85 Left =3231 Top =793 Width =2820 Height =315 BorderColor =8355711 Name ="Étiquette6" Caption ="Commentaire" GridlineColor =10921638 LayoutCachedLeft =3231 LayoutCachedTop =793 LayoutCachedWidth =6051 LayoutCachedHeight =1108 ForeTint =100.0 End Begin Label OverlapFlags =85 Left =680 Top =56 Width =3986 Height =334 FontSize =13 BorderColor =8355711 Name ="Étiquette7" Caption ="Gestion des barèmes" GridlineColor =10921638 LayoutCachedLeft =680 LayoutCachedTop =56 LayoutCachedWidth =4666 LayoutCachedHeight =390 ForeTint =100.0 End Begin CommandButton OverlapFlags =85 Left =56 Top =56 Width =576 Height =351 ForeColor =4210752 Name ="Commande16" Caption ="Commande16" ControlTipText ="Fermer formulaire" GridlineColor =10921638 OnClickEmMacro = Begin Version =196611 ColumnsShown =8 Begin Action ="Close" Argument ="-1" Argument ="" Argument ="0" End Begin Comment ="_AXL:\015\012" End Begin Comment ="_AXL:" End End ImageData = Begin 0x2800000010000000100000000100200000000000000000000000000000000000 , 0x0000000000000000000000000000000000000000000000000000000010081080 , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x000000000000000000000000000000000000000040485020100810e0104050ff , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x0000000000000000000000000000000040404080405860ff106890ff2080a0f0 , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x0000000000000000607070ff80a0b0ff4080a0ff20a0d0ff40a8e0ff2078a0ff , 0x101020ff101020ff000000000000000000000000000000000000000000000000 , 0x0000000000000000708890ffa0d8f0ff60d0ffff50c0f0ff30a8e0ff1080b0ff , 0xe0d8d0ff102020ff000000000000000000000000000000000000000000000000 , 0x0000000000000000708890ffb0e8f0ff80e0ffff60c8f0ff50b8f0ff1088c0ff , 0xf0d8d0ff202830ff000000000000000090482030904820ff0000000000000000 , 0x0000000000000000808890ffb0e8f0ff80e0ffff60d0ffff404050ff1090c0ff , 0xf0e0d0ff303840ff0000000090482030a05030ffa05020ff0000000000000000 , 0x00000000000000008090a0ffc0f0ffff90e0ffff70d8ffff60c8f0ff0090c0ff , 0xf0e0e0ff404050ff90482030a05030ffd07840ffb05830ffa05020ffa04820ff , 0x904820ff904820ff8090a0ffc0f0ffffa0e8ffff80d8ffff70d0f0ff40b0e0ff , 0xf0e8e0ff605050ffa05830ffe08860fff09060fff08850ffe07850ffd07040ff , 0xb06840ff904820ff8098a0ffc0f0ffffa0e8ffff90e8ffff80e0ffff80b8d0ff , 0xf0e8e0ffe09870ffffc0a0ffffb090ffffa070fff09060fff08850ffe07850ff , 0xd07040ffa05020ff8098a0ffc0f0ffffc0f8ffffa0e0f0ff90a8b0ffc0c8d0ff , 0xf0f0e0ff908080fff0a070ffffc0a0ffffb090ffffb090ffffa880fff0a080ff , 0xe09870ffb05030ff90a0a0ffe0f8ffffb0c8d0ff90a0b0fff0f0f0fffff8f0ff , 0xf0f0f0ff607080ffe0987050f0a070ffffc0a0ffd06830ffe09870ffe09060ff , 0xe08860ffe08050ff90a0b0ff90a8b0ffc0c8d0ffffffffffffffffffffffffff , 0xffffffff708890ff00000000e0987050e09870ffd07040ff0000000000000000 , 0x000000000000000090a0b0ff90a0b0ff90a0b0ff90a0b0ff90a0a0ff8098a0ff , 0x8098a0ff9098a0ff0000000000000000e0987050e09870ff0000000000000000 , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x0000000000000000000000000000000000000000000000000000000000000000 , 0x0000000000000000 End LayoutCachedLeft =56 LayoutCachedTop =56 LayoutCachedWidth =632 LayoutCachedHeight =407 Gradient =0 BackColor =14277081 BackThemeColorIndex =1 BackTint =100.0 BackShade =85.0 BorderColor =14136213 HoverColor =15060409 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 WebImagePaddingLeft =2 WebImagePaddingTop =2 WebImagePaddingRight =1 WebImagePaddingBottom =1 End Begin Label OverlapFlags =85 Left =6525 Top =795 Width =1575 Height =315 BorderColor =8355711 Name ="Étiquette20" Caption ="Valide depuis le" GridlineColor =10921638 LayoutCachedLeft =6525 LayoutCachedTop =795 LayoutCachedWidth =8100 LayoutCachedHeight =1110 ForeTint =100.0 End End End Begin Section CanGrow = NotDefault CanShrink = NotDefault Height =453 BackColor =14211288 Name ="Détail" AlternateBackColor =15921906 AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 Begin Begin TextBox OverlapFlags =85 BackStyle =0 IMESentenceMode =3 Left =566 Top =56 Width =2556 Height =315 ColumnWidth =2790 BorderColor =10921638 ForeColor =4210752 Name ="NomBareme" ControlSource ="NomBareme" GridlineColor =10921638 LayoutCachedLeft =566 LayoutCachedTop =56 LayoutCachedWidth =3122 LayoutCachedHeight =371 End Begin TextBox OverlapFlags =85 BackStyle =0 IMESentenceMode =3 Left =3231 Top =56 Width =3171 Height =315 ColumnWidth =2775 TabIndex =1 BorderColor =10921638 ForeColor =4210752 Name ="Commentaire" ControlSource ="Commentaire" GridlineColor =10921638 LayoutCachedLeft =3231 LayoutCachedTop =56 LayoutCachedWidth =6402 LayoutCachedHeight =371 End Begin TextBox OverlapFlags =85 BackStyle =0 IMESentenceMode =3 Left =6519 Top =56 Height =315 TabIndex =2 BorderColor =10921638 ForeColor =4210752 Name ="DateInf" ControlSource ="MaxDeDateInf" GridlineColor =10921638 LayoutCachedLeft =6519 LayoutCachedTop =56 LayoutCachedWidth =8220 LayoutCachedHeight =371 End Begin CommandButton OverlapFlags =85 Left =8447 Top =56 Width =2494 Height =340 TabIndex =3 ForeColor =4210752 Name ="Commande29" Caption ="Historique des versions" OnClick ="[Event Procedure]" GridlineColor =10921638 LayoutCachedLeft =8447 LayoutCachedTop =56 LayoutCachedWidth =10941 LayoutCachedHeight =396 Gradient =0 BackColor =15921906 BackThemeColorIndex =1 BackTint =100.0 BackShade =95.0 BorderColor =14136213 HoverColor =15060409 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 WebImagePaddingLeft =2 WebImagePaddingTop =2 WebImagePaddingRight =1 WebImagePaddingBottom =1 End Begin CommandButton OverlapFlags =85 Left =11168 Top =56 Width =2494 Height =340 TabIndex =4 ForeColor =4210752 Name ="cmdMAJ" Caption ="Mettre à jour" OnClick ="[Event Procedure]" GridlineColor =10921638 LayoutCachedLeft =11168 LayoutCachedTop =56 LayoutCachedWidth =13662 LayoutCachedHeight =396 Gradient =0 BackColor =15921906 BackThemeColorIndex =1 BackTint =100.0 BackShade =95.0 BorderColor =14136213 HoverColor =15060409 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 WebImagePaddingLeft =2 WebImagePaddingTop =2 WebImagePaddingRight =1 WebImagePaddingBottom =1 End End End Begin FormFooter CanGrow = NotDefault CanShrink = NotDefault Height =2324 BackColor =10855845 Name ="PiedFormulaire" AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 Begin Begin Subform CanGrow = NotDefault OverlapFlags =85 BorderWidth =2 Left =510 Top =170 Width =12075 Height =1635 BorderColor =16777215 Name ="sfrm_detailbareme" SourceObject ="Form.sfrm_detailbareme" LinkChildFields ="NomBareme" LinkMasterFields ="NomBareme" GridlineColor =10921638 LayoutCachedLeft =510 LayoutCachedTop =170 LayoutCachedWidth =12585 LayoutCachedHeight =1805 BorderShade =100.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 cmdMAJ_Click() Dim critere, NomBareme As String Dim periode As Integer NomBareme = Nz(Me.NomBareme, "") 'cherche la période la plus récente pour cet agent (attention au format des dates, les fonctions de domaine utilisent le format anglosaxon (mm/jj/aaaa) periode = Nz(DLookup("[CodePeriode]", "tbl_PeriodeBareme", "[NomBareme]='" & NomBareme & "' AND [DateInf]=#" & Format(DMax("[DateInf]", "tbl_PeriodeBareme", "[NomBareme]='" & NomBareme & "'"), "mm/dd/yyyy") & "#"), 0) If periode = 0 Then Exit Sub If NomBareme = "" Or periode = 0 Then Exit Sub critere = "[NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & periode DoCmd.OpenForm "frm_MAJBareme", , , critere End Sub Private Sub Commande29_Click() Dim critere, NomBareme As String NomBareme = Nz(Me.NomBareme, "") critere = "[NomBareme]='" & NomBareme & "'" DoCmd.OpenForm "frm_HistoBaremes", , , critere End Sub Sub AffichageSfrm() Dim niv As Integer Dim hauteur As Double niv = 0 If IsNull(Me![sfrm_detailbareme].Form.BorneInf) Then 'coeff simple niv = 1 Else 'barême niv = 2 End If Call VerrouSfrmDetailBareme(forms![frm_lstBaremes], niv) 'hauteur auto hauteur = Me.[sfrm_detailbareme].Form.EntêteFormulaire.Height _ + Me.[sfrm_detailbareme].Form.PiedFormulaire.Height _ + Me.[sfrm_detailbareme].Form.Détail.Height _ * (Me.[sfrm_detailbareme].Form.RecordsetClone.RecordCount) _ + 110 Me.[sfrm_detailbareme].Form.InsideHeight = hauteur Me.[sfrm_detailbareme].Height = hauteur Me.Refresh End Sub Private Sub Form_Current() AffichageSfrm End Sub Private Sub Form_Open(Cancel As Integer) 'hauteur pied de form auto Dim compte As Integer Dim rst As DAO.Recordset Set rst = Me.RecordsetClone If rst.RecordCount = 0 Then Exit Sub rst.MoveLast compte = rst.RecordCount Me.PiedFormulaire.Height = Me.Form.InsideHeight - (Me.EntêteFormulaire.Height + compte * Me.Détail.Height) End Sub