frm_BaremesValide.bas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. Version =20
  2. VersionRequired =20
  3. Begin Form
  4. DividingLines = NotDefault
  5. AllowDesignChanges = NotDefault
  6. RecordLocks =1
  7. PictureAlignment =2
  8. DatasheetGridlinesBehavior =3
  9. GridY =10
  10. Width =15193
  11. DatasheetFontHeight =11
  12. ItemSuffix =29
  13. Right =10050
  14. Bottom =12345
  15. DatasheetGridlinesColor =14806254
  16. RecSrcDt = Begin
  17. 0x127907bf35d1e440
  18. End
  19. RecordSource ="SELECT tbl_baremes.NomBareme, tbl_baremes.Commentaire, tbl_baremes.PeriodeValidi"
  20. "te FROM r_BaremeValide INNER JOIN tbl_baremes ON (r_BaremeValide.Expr1 = tbl_bar"
  21. "emes.PeriodeValidite) AND (r_BaremeValide.NomBareme = tbl_baremes.NomBareme) GRO"
  22. "UP BY tbl_baremes.NomBareme, tbl_baremes.Commentaire, tbl_baremes.PeriodeValidit"
  23. "e ORDER BY tbl_baremes.NomBareme; "
  24. OnCurrent ="[Event Procedure]"
  25. OnOpen ="[Event Procedure]"
  26. DatasheetFontName ="Calibri"
  27. PrtMip = Begin
  28. 0x6801000068010000680100006801000000000000201c0000e010000001000000 ,
  29. 0x010000006801000000000000a10700000100000001000000
  30. End
  31. FilterOnLoad =0
  32. ShowPageMargins =0
  33. DisplayOnSharePointSite =1
  34. DatasheetAlternateBackColor =15921906
  35. DatasheetGridlinesColor12 =0
  36. FitToScreen =1
  37. DatasheetBackThemeColorIndex =1
  38. BorderThemeColorIndex =3
  39. ThemeFontIndex =1
  40. ForeThemeColorIndex =0
  41. AlternateBackThemeColorIndex =1
  42. AlternateBackShade =95.0
  43. Begin
  44. Begin Label
  45. BackStyle =0
  46. FontSize =11
  47. FontName ="Calibri"
  48. ThemeFontIndex =1
  49. BackThemeColorIndex =1
  50. BorderThemeColorIndex =0
  51. BorderTint =50.0
  52. ForeThemeColorIndex =0
  53. ForeTint =50.0
  54. GridlineThemeColorIndex =1
  55. GridlineShade =65.0
  56. End
  57. Begin CommandButton
  58. Width =1701
  59. Height =283
  60. FontSize =11
  61. FontWeight =400
  62. FontName ="Calibri"
  63. ForeThemeColorIndex =0
  64. ForeTint =75.0
  65. GridlineThemeColorIndex =1
  66. GridlineShade =65.0
  67. UseTheme =1
  68. Shape =1
  69. Gradient =12
  70. BackThemeColorIndex =4
  71. BackTint =60.0
  72. BorderLineStyle =0
  73. BorderColor =16777215
  74. BorderThemeColorIndex =4
  75. BorderTint =60.0
  76. ThemeFontIndex =1
  77. HoverThemeColorIndex =4
  78. HoverTint =40.0
  79. PressedThemeColorIndex =4
  80. PressedShade =75.0
  81. HoverForeThemeColorIndex =0
  82. HoverForeTint =75.0
  83. PressedForeThemeColorIndex =0
  84. PressedForeTint =75.0
  85. End
  86. Begin TextBox
  87. AddColon = NotDefault
  88. FELineBreak = NotDefault
  89. BorderLineStyle =0
  90. Width =1701
  91. LabelX =-1701
  92. FontSize =11
  93. FontName ="Calibri"
  94. AsianLineBreak =1
  95. BackThemeColorIndex =1
  96. BorderThemeColorIndex =1
  97. BorderShade =65.0
  98. ThemeFontIndex =1
  99. ForeThemeColorIndex =0
  100. ForeTint =75.0
  101. GridlineThemeColorIndex =1
  102. GridlineShade =65.0
  103. End
  104. Begin ComboBox
  105. AddColon = NotDefault
  106. BorderLineStyle =0
  107. Width =1701
  108. LabelX =-1701
  109. FontSize =11
  110. FontName ="Calibri"
  111. AllowValueListEdits =1
  112. InheritValueList =1
  113. ThemeFontIndex =1
  114. BackThemeColorIndex =1
  115. BorderThemeColorIndex =1
  116. BorderShade =65.0
  117. ForeThemeColorIndex =2
  118. ForeShade =50.0
  119. GridlineThemeColorIndex =1
  120. GridlineShade =65.0
  121. End
  122. Begin Subform
  123. BorderLineStyle =0
  124. Width =1701
  125. Height =1701
  126. BorderThemeColorIndex =1
  127. GridlineThemeColorIndex =1
  128. GridlineShade =65.0
  129. BorderShade =65.0
  130. ShowPageHeaderAndPageFooter =1
  131. End
  132. Begin FormHeader
  133. Height =1133
  134. BackColor =12566463
  135. Name ="EntêteFormulaire"
  136. AlternateBackThemeColorIndex =1
  137. AlternateBackShade =95.0
  138. Begin
  139. Begin Label
  140. OverlapFlags =85
  141. Left =566
  142. Top =793
  143. Width =1245
  144. Height =315
  145. BorderColor =8355711
  146. Name ="Étiquette0"
  147. Caption ="NomBareme"
  148. GridlineColor =10921638
  149. LayoutCachedLeft =566
  150. LayoutCachedTop =793
  151. LayoutCachedWidth =1811
  152. LayoutCachedHeight =1108
  153. ForeTint =100.0
  154. End
  155. Begin Label
  156. OverlapFlags =85
  157. Left =3231
  158. Top =793
  159. Width =2820
  160. Height =315
  161. BorderColor =8355711
  162. Name ="Étiquette6"
  163. Caption ="Commentaire"
  164. GridlineColor =10921638
  165. LayoutCachedLeft =3231
  166. LayoutCachedTop =793
  167. LayoutCachedWidth =6051
  168. LayoutCachedHeight =1108
  169. ForeTint =100.0
  170. End
  171. Begin Label
  172. OverlapFlags =93
  173. Left =680
  174. Top =56
  175. Width =3986
  176. Height =334
  177. FontSize =13
  178. BorderColor =8355711
  179. Name ="Étiquette7"
  180. Caption ="Barèmes valides pour le mois de "
  181. GridlineColor =10921638
  182. LayoutCachedLeft =680
  183. LayoutCachedTop =56
  184. LayoutCachedWidth =4666
  185. LayoutCachedHeight =390
  186. ForeTint =100.0
  187. End
  188. Begin CommandButton
  189. OverlapFlags =85
  190. Left =56
  191. Top =56
  192. Width =576
  193. Height =351
  194. ForeColor =4210752
  195. Name ="Commande16"
  196. Caption ="Commande16"
  197. ControlTipText ="Fermer formulaire"
  198. GridlineColor =10921638
  199. OnClickEmMacro = Begin
  200. Version =196611
  201. ColumnsShown =8
  202. Begin
  203. Action ="Close"
  204. Argument ="-1"
  205. Argument =""
  206. Argument ="0"
  207. End
  208. Begin
  209. Comment ="_AXL:<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\015\012<UserI"
  210. "nterfaceMacro For=\"Commande16\" xmlns=\"http://schemas.microsoft.com/office/acc"
  211. "essservices/2009/11/application\" xmlns:a=\"http://schemas.microsoft.com/office/"
  212. "accessservices/2009/11/forms\">"
  213. End
  214. Begin
  215. Comment ="_AXL:<Statements><Action Name=\"CloseWindow\"/></Statements></UserInterfaceMacro"
  216. ">"
  217. End
  218. End
  219. ImageData = Begin
  220. 0x2800000010000000100000000100200000000000000000000000000000000000 ,
  221. 0x0000000000000000000000000000000000000000000000000000000010081080 ,
  222. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  223. 0x000000000000000000000000000000000000000040485020100810e0104050ff ,
  224. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  225. 0x0000000000000000000000000000000040404080405860ff106890ff2080a0f0 ,
  226. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  227. 0x0000000000000000607070ff80a0b0ff4080a0ff20a0d0ff40a8e0ff2078a0ff ,
  228. 0x101020ff101020ff000000000000000000000000000000000000000000000000 ,
  229. 0x0000000000000000708890ffa0d8f0ff60d0ffff50c0f0ff30a8e0ff1080b0ff ,
  230. 0xe0d8d0ff102020ff000000000000000000000000000000000000000000000000 ,
  231. 0x0000000000000000708890ffb0e8f0ff80e0ffff60c8f0ff50b8f0ff1088c0ff ,
  232. 0xf0d8d0ff202830ff000000000000000090482030904820ff0000000000000000 ,
  233. 0x0000000000000000808890ffb0e8f0ff80e0ffff60d0ffff404050ff1090c0ff ,
  234. 0xf0e0d0ff303840ff0000000090482030a05030ffa05020ff0000000000000000 ,
  235. 0x00000000000000008090a0ffc0f0ffff90e0ffff70d8ffff60c8f0ff0090c0ff ,
  236. 0xf0e0e0ff404050ff90482030a05030ffd07840ffb05830ffa05020ffa04820ff ,
  237. 0x904820ff904820ff8090a0ffc0f0ffffa0e8ffff80d8ffff70d0f0ff40b0e0ff ,
  238. 0xf0e8e0ff605050ffa05830ffe08860fff09060fff08850ffe07850ffd07040ff ,
  239. 0xb06840ff904820ff8098a0ffc0f0ffffa0e8ffff90e8ffff80e0ffff80b8d0ff ,
  240. 0xf0e8e0ffe09870ffffc0a0ffffb090ffffa070fff09060fff08850ffe07850ff ,
  241. 0xd07040ffa05020ff8098a0ffc0f0ffffc0f8ffffa0e0f0ff90a8b0ffc0c8d0ff ,
  242. 0xf0f0e0ff908080fff0a070ffffc0a0ffffb090ffffb090ffffa880fff0a080ff ,
  243. 0xe09870ffb05030ff90a0a0ffe0f8ffffb0c8d0ff90a0b0fff0f0f0fffff8f0ff ,
  244. 0xf0f0f0ff607080ffe0987050f0a070ffffc0a0ffd06830ffe09870ffe09060ff ,
  245. 0xe08860ffe08050ff90a0b0ff90a8b0ffc0c8d0ffffffffffffffffffffffffff ,
  246. 0xffffffff708890ff00000000e0987050e09870ffd07040ff0000000000000000 ,
  247. 0x000000000000000090a0b0ff90a0b0ff90a0b0ff90a0b0ff90a0a0ff8098a0ff ,
  248. 0x8098a0ff9098a0ff0000000000000000e0987050e09870ff0000000000000000 ,
  249. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  250. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  251. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  252. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  253. 0x0000000000000000
  254. End
  255. LayoutCachedLeft =56
  256. LayoutCachedTop =56
  257. LayoutCachedWidth =632
  258. LayoutCachedHeight =407
  259. Gradient =0
  260. BackColor =14277081
  261. BackThemeColorIndex =1
  262. BackTint =100.0
  263. BackShade =85.0
  264. BorderColor =14136213
  265. HoverColor =15060409
  266. PressedColor =9592887
  267. HoverForeColor =4210752
  268. PressedForeColor =4210752
  269. WebImagePaddingLeft =2
  270. WebImagePaddingTop =2
  271. WebImagePaddingRight =1
  272. WebImagePaddingBottom =1
  273. End
  274. Begin Label
  275. OverlapFlags =85
  276. Left =6519
  277. Top =793
  278. Width =1545
  279. Height =315
  280. BorderColor =8355711
  281. Name ="Étiquette19"
  282. Caption ="PeriodeValidite"
  283. GridlineColor =10921638
  284. LayoutCachedLeft =6519
  285. LayoutCachedTop =793
  286. LayoutCachedWidth =8064
  287. LayoutCachedHeight =1108
  288. ForeTint =100.0
  289. End
  290. Begin TextBox
  291. OldBorderStyle =0
  292. OverlapFlags =215
  293. BackStyle =0
  294. IMESentenceMode =3
  295. Left =4195
  296. Top =56
  297. Width =1418
  298. Height =315
  299. ColumnOrder =0
  300. FontSize =13
  301. TabIndex =1
  302. BorderColor =10921638
  303. ForeColor =4210752
  304. Name ="Texte8"
  305. ControlSource ="=UCase(MonthName([Forms]![frm_Menu]![Mois]))"
  306. GridlineColor =10921638
  307. LayoutCachedLeft =4195
  308. LayoutCachedTop =56
  309. LayoutCachedWidth =5613
  310. LayoutCachedHeight =371
  311. End
  312. Begin TextBox
  313. OldBorderStyle =0
  314. OverlapFlags =85
  315. BackStyle =0
  316. IMESentenceMode =3
  317. Left =5726
  318. Top =56
  319. Width =1247
  320. Height =315
  321. ColumnOrder =1
  322. FontSize =13
  323. TabIndex =2
  324. BorderColor =10921638
  325. ForeColor =4210752
  326. Name ="Texte10"
  327. ControlSource ="=[Forms]![frm_Menu]![Annee]"
  328. GridlineColor =10921638
  329. LayoutCachedLeft =5726
  330. LayoutCachedTop =56
  331. LayoutCachedWidth =6973
  332. LayoutCachedHeight =371
  333. End
  334. End
  335. End
  336. Begin Section
  337. CanGrow = NotDefault
  338. CanShrink = NotDefault
  339. Height =510
  340. BackColor =14211288
  341. Name ="Détail"
  342. AlternateBackColor =15921906
  343. AlternateBackThemeColorIndex =1
  344. AlternateBackShade =95.0
  345. Begin
  346. Begin TextBox
  347. OverlapFlags =85
  348. BackStyle =0
  349. IMESentenceMode =3
  350. Left =566
  351. Top =56
  352. Width =2556
  353. Height =315
  354. ColumnWidth =2790
  355. BorderColor =10921638
  356. ForeColor =4210752
  357. Name ="NomBareme"
  358. ControlSource ="NomBareme"
  359. GridlineColor =10921638
  360. LayoutCachedLeft =566
  361. LayoutCachedTop =56
  362. LayoutCachedWidth =3122
  363. LayoutCachedHeight =371
  364. End
  365. Begin TextBox
  366. OverlapFlags =85
  367. BackStyle =0
  368. IMESentenceMode =3
  369. Left =3231
  370. Top =56
  371. Width =3171
  372. Height =315
  373. ColumnWidth =2775
  374. TabIndex =1
  375. BorderColor =10921638
  376. ForeColor =4210752
  377. Name ="Commentaire"
  378. ControlSource ="Commentaire"
  379. GridlineColor =10921638
  380. LayoutCachedLeft =3231
  381. LayoutCachedTop =56
  382. LayoutCachedWidth =6402
  383. LayoutCachedHeight =371
  384. End
  385. Begin TextBox
  386. OverlapFlags =85
  387. BackStyle =0
  388. IMESentenceMode =3
  389. Left =6519
  390. Top =56
  391. Height =315
  392. TabIndex =2
  393. BorderColor =10921638
  394. ForeColor =4210752
  395. Name ="PeriodeValidite"
  396. ControlSource ="PeriodeValidite"
  397. StatusBarText ="cf. tbl_PeriodeBareme"
  398. GridlineColor =10921638
  399. LayoutCachedLeft =6519
  400. LayoutCachedTop =56
  401. LayoutCachedWidth =8220
  402. LayoutCachedHeight =371
  403. End
  404. Begin CommandButton
  405. Visible = NotDefault
  406. OverlapFlags =85
  407. Left =12415
  408. Top =56
  409. Width =2341
  410. Height =340
  411. TabIndex =3
  412. ForeColor =4210752
  413. Name ="MAJBareme"
  414. Caption ="Mettre à jour"
  415. OnClick ="[Event Procedure]"
  416. GridlineColor =10921638
  417. LayoutCachedLeft =12415
  418. LayoutCachedTop =56
  419. LayoutCachedWidth =14756
  420. LayoutCachedHeight =396
  421. Gradient =0
  422. BackThemeColorIndex =1
  423. BackTint =100.0
  424. BorderColor =14136213
  425. HoverColor =15060409
  426. PressedColor =9592887
  427. HoverForeColor =4210752
  428. PressedForeColor =4210752
  429. WebImagePaddingLeft =2
  430. WebImagePaddingTop =2
  431. WebImagePaddingRight =1
  432. WebImagePaddingBottom =1
  433. End
  434. End
  435. End
  436. Begin FormFooter
  437. CanGrow = NotDefault
  438. CanShrink = NotDefault
  439. Height =2097
  440. BackColor =10855845
  441. Name ="PiedFormulaire"
  442. AlternateBackThemeColorIndex =1
  443. AlternateBackShade =95.0
  444. Begin
  445. Begin Subform
  446. CanShrink = NotDefault
  447. OverlapFlags =85
  448. BorderWidth =2
  449. Left =566
  450. Top =283
  451. Width =12075
  452. Height =1365
  453. BorderColor =16777215
  454. Name ="sfrm_detailbareme"
  455. SourceObject ="Form.sfrm_detailbareme"
  456. LinkChildFields ="NomBareme;PeriodeValidite"
  457. LinkMasterFields ="NomBareme;PeriodeValidite"
  458. GridlineColor =10921638
  459. LayoutCachedLeft =566
  460. LayoutCachedTop =283
  461. LayoutCachedWidth =12641
  462. LayoutCachedHeight =1648
  463. BorderShade =100.0
  464. End
  465. End
  466. End
  467. End
  468. End
  469. CodeBehindForm
  470. Attribute VB_GlobalNameSpace = False
  471. Attribute VB_Creatable = True
  472. Attribute VB_PredeclaredId = True
  473. Attribute VB_Exposed = False
  474. Option Compare Database
  475. Private Sub Form_Current()
  476. AffichageSfrm
  477. End Sub
  478. Private Sub Form_Open(Cancel As Integer)
  479. 'hauteur pied de form auto
  480. Dim compte As Integer
  481. Dim rst As DAO.Recordset
  482. Set rst = Me.RecordsetClone
  483. If rst.RecordCount = 0 Then Exit Sub
  484. rst.MoveLast
  485. compte = rst.RecordCount
  486. Me.PiedFormulaire.Height = Me.Form.InsideHeight - (Me.EntêteFormulaire.Height + compte * Me.Détail.Height)
  487. End Sub
  488. Private Sub MAJBareme_Click()
  489. Dim NomBareme As String
  490. Dim PeriodeValidite As Integer
  491. Dim sql, critere As String
  492. NomBareme = Me.NomBareme
  493. PeriodeValidite = Me.PeriodeValidite
  494. 'Call NvellePeriode("tbl_PeriodeBareme", NomBareme, PeriodeValidite)
  495. critere = "[NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & PeriodeValidite
  496. DoCmd.OpenForm "frm_ModifBareme", , , critere
  497. End Sub
  498. Sub AffichageSfrm()
  499. Dim niv As Integer
  500. niv = 0
  501. If IsNull(Me![sfrm_detailbareme].Form.BorneInf) Then
  502. 'coeff simple
  503. niv = 1
  504. Else
  505. 'barême
  506. niv = 2
  507. End If
  508. Call VerrouSfrmDetailBareme(forms![frm_BaremesValide], niv)
  509. 'hauteur auto
  510. hauteur = Me.[sfrm_detailbareme].Form.EntêteFormulaire.Height _
  511. + Me.[sfrm_detailbareme].Form.PiedFormulaire.Height _
  512. + Me.[sfrm_detailbareme].Form.Détail.Height _
  513. * (Me.[sfrm_detailbareme].Form.RecordsetClone.RecordCount) _
  514. + 110
  515. Me.[sfrm_detailbareme].Form.InsideHeight = hauteur
  516. Me.[sfrm_detailbareme].Height = hauteur
  517. Me.Refresh
  518. End Sub