frm_MAJBareme.bas 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. Version =20
  2. VersionRequired =20
  3. Begin Form
  4. DividingLines = NotDefault
  5. AllowAdditions = NotDefault
  6. FilterOn = NotDefault
  7. AllowDesignChanges = NotDefault
  8. PictureAlignment =2
  9. DatasheetGridlinesBehavior =3
  10. GridY =10
  11. Width =12245
  12. DatasheetFontHeight =11
  13. ItemSuffix =15
  14. Right =10395
  15. Bottom =12345
  16. DatasheetGridlinesColor =14806254
  17. Filter ="[NomBareme]='Frais Kilométriques (11)' AND [PeriodeValidite]=1"
  18. RecSrcDt = Begin
  19. 0xf052af211737e440
  20. End
  21. RecordSource ="SELECT tbl_baremes.NomBareme, tbl_baremes.PeriodeValidite, tbl_baremes.BorneInf,"
  22. " tbl_baremes.BorneSup, tbl_baremes.UniteBornes, tbl_baremes.Valeur, tbl_baremes."
  23. "UniteValeur, tbl_baremes.Commentaire FROM tbl_baremes ORDER BY tbl_baremes.Borne"
  24. "Inf; "
  25. AfterUpdate ="[Event Procedure]"
  26. OnOpen ="[Event Procedure]"
  27. DatasheetFontName ="Calibri"
  28. FilterOnLoad =0
  29. ShowPageMargins =0
  30. DisplayOnSharePointSite =1
  31. DatasheetAlternateBackColor =15921906
  32. DatasheetGridlinesColor12 =0
  33. FitToScreen =1
  34. DatasheetBackThemeColorIndex =1
  35. BorderThemeColorIndex =3
  36. ThemeFontIndex =1
  37. ForeThemeColorIndex =0
  38. AlternateBackThemeColorIndex =1
  39. AlternateBackShade =95.0
  40. Begin
  41. Begin Label
  42. BackStyle =0
  43. FontSize =11
  44. FontName ="Calibri"
  45. ThemeFontIndex =1
  46. BackThemeColorIndex =1
  47. BorderThemeColorIndex =0
  48. BorderTint =50.0
  49. ForeThemeColorIndex =0
  50. ForeTint =50.0
  51. GridlineThemeColorIndex =1
  52. GridlineShade =65.0
  53. End
  54. Begin CommandButton
  55. Width =1701
  56. Height =283
  57. FontSize =11
  58. FontWeight =400
  59. FontName ="Calibri"
  60. ForeThemeColorIndex =0
  61. ForeTint =75.0
  62. GridlineThemeColorIndex =1
  63. GridlineShade =65.0
  64. UseTheme =1
  65. Shape =1
  66. Gradient =12
  67. BackThemeColorIndex =4
  68. BackTint =60.0
  69. BorderLineStyle =0
  70. BorderColor =16777215
  71. BorderThemeColorIndex =4
  72. BorderTint =60.0
  73. ThemeFontIndex =1
  74. HoverThemeColorIndex =4
  75. HoverTint =40.0
  76. PressedThemeColorIndex =4
  77. PressedShade =75.0
  78. HoverForeThemeColorIndex =0
  79. HoverForeTint =75.0
  80. PressedForeThemeColorIndex =0
  81. PressedForeTint =75.0
  82. End
  83. Begin TextBox
  84. AddColon = NotDefault
  85. FELineBreak = NotDefault
  86. BorderLineStyle =0
  87. Width =1701
  88. LabelX =-1701
  89. FontSize =11
  90. FontName ="Calibri"
  91. AsianLineBreak =1
  92. BackThemeColorIndex =1
  93. BorderThemeColorIndex =1
  94. BorderShade =65.0
  95. ThemeFontIndex =1
  96. ForeThemeColorIndex =0
  97. ForeTint =75.0
  98. GridlineThemeColorIndex =1
  99. GridlineShade =65.0
  100. End
  101. Begin ComboBox
  102. AddColon = NotDefault
  103. BorderLineStyle =0
  104. Width =1701
  105. LabelX =-1701
  106. FontSize =11
  107. FontName ="Calibri"
  108. AllowValueListEdits =1
  109. InheritValueList =1
  110. ThemeFontIndex =1
  111. BackThemeColorIndex =1
  112. BorderThemeColorIndex =1
  113. BorderShade =65.0
  114. ForeThemeColorIndex =2
  115. ForeShade =50.0
  116. GridlineThemeColorIndex =1
  117. GridlineShade =65.0
  118. End
  119. Begin FormHeader
  120. Height =2607
  121. BackColor =10855845
  122. Name ="EntêteFormulaire"
  123. AlternateBackThemeColorIndex =1
  124. AlternateBackShade =95.0
  125. Begin
  126. Begin Label
  127. OverlapFlags =93
  128. Left =624
  129. Width =3986
  130. Height =334
  131. FontSize =13
  132. BorderColor =8355711
  133. Name ="Étiquette7"
  134. Caption ="Mise à jour du barème:"
  135. GridlineColor =10921638
  136. LayoutCachedLeft =624
  137. LayoutCachedWidth =4610
  138. LayoutCachedHeight =334
  139. ForeTint =100.0
  140. End
  141. Begin CommandButton
  142. OverlapFlags =85
  143. Width =576
  144. Height =351
  145. ForeColor =4210752
  146. Name ="Commande16"
  147. Caption ="Commande16"
  148. ControlTipText ="Fermer formulaire"
  149. GridlineColor =10921638
  150. OnClickEmMacro = Begin
  151. Version =196611
  152. ColumnsShown =8
  153. Begin
  154. Action ="Close"
  155. Argument ="-1"
  156. Argument =""
  157. Argument ="0"
  158. End
  159. Begin
  160. Comment ="_AXL:<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\015\012<UserI"
  161. "nterfaceMacro For=\"Commande16\" xmlns=\"http://schemas.microsoft.com/office/acc"
  162. "essservices/2009/11/application\" xmlns:a=\"http://schemas.microsoft.com/office/"
  163. "accessservices/2009/11/forms\">"
  164. End
  165. Begin
  166. Comment ="_AXL:<Statements><Action Name=\"CloseWindow\"/></Statements></UserInterfaceMacro"
  167. ">"
  168. End
  169. End
  170. ImageData = Begin
  171. 0x2800000010000000100000000100200000000000000000000000000000000000 ,
  172. 0x0000000000000000000000000000000000000000000000000000000010081080 ,
  173. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  174. 0x000000000000000000000000000000000000000040485020100810e0104050ff ,
  175. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  176. 0x0000000000000000000000000000000040404080405860ff106890ff2080a0f0 ,
  177. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  178. 0x0000000000000000607070ff80a0b0ff4080a0ff20a0d0ff40a8e0ff2078a0ff ,
  179. 0x101020ff101020ff000000000000000000000000000000000000000000000000 ,
  180. 0x0000000000000000708890ffa0d8f0ff60d0ffff50c0f0ff30a8e0ff1080b0ff ,
  181. 0xe0d8d0ff102020ff000000000000000000000000000000000000000000000000 ,
  182. 0x0000000000000000708890ffb0e8f0ff80e0ffff60c8f0ff50b8f0ff1088c0ff ,
  183. 0xf0d8d0ff202830ff000000000000000090482030904820ff0000000000000000 ,
  184. 0x0000000000000000808890ffb0e8f0ff80e0ffff60d0ffff404050ff1090c0ff ,
  185. 0xf0e0d0ff303840ff0000000090482030a05030ffa05020ff0000000000000000 ,
  186. 0x00000000000000008090a0ffc0f0ffff90e0ffff70d8ffff60c8f0ff0090c0ff ,
  187. 0xf0e0e0ff404050ff90482030a05030ffd07840ffb05830ffa05020ffa04820ff ,
  188. 0x904820ff904820ff8090a0ffc0f0ffffa0e8ffff80d8ffff70d0f0ff40b0e0ff ,
  189. 0xf0e8e0ff605050ffa05830ffe08860fff09060fff08850ffe07850ffd07040ff ,
  190. 0xb06840ff904820ff8098a0ffc0f0ffffa0e8ffff90e8ffff80e0ffff80b8d0ff ,
  191. 0xf0e8e0ffe09870ffffc0a0ffffb090ffffa070fff09060fff08850ffe07850ff ,
  192. 0xd07040ffa05020ff8098a0ffc0f0ffffc0f8ffffa0e0f0ff90a8b0ffc0c8d0ff ,
  193. 0xf0f0e0ff908080fff0a070ffffc0a0ffffb090ffffb090ffffa880fff0a080ff ,
  194. 0xe09870ffb05030ff90a0a0ffe0f8ffffb0c8d0ff90a0b0fff0f0f0fffff8f0ff ,
  195. 0xf0f0f0ff607080ffe0987050f0a070ffffc0a0ffd06830ffe09870ffe09060ff ,
  196. 0xe08860ffe08050ff90a0b0ff90a8b0ffc0c8d0ffffffffffffffffffffffffff ,
  197. 0xffffffff708890ff00000000e0987050e09870ffd07040ff0000000000000000 ,
  198. 0x000000000000000090a0b0ff90a0b0ff90a0b0ff90a0b0ff90a0a0ff8098a0ff ,
  199. 0x8098a0ff9098a0ff0000000000000000e0987050e09870ff0000000000000000 ,
  200. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  201. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  202. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  203. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  204. 0x0000000000000000
  205. End
  206. LayoutCachedWidth =576
  207. LayoutCachedHeight =351
  208. Gradient =0
  209. BackColor =14277081
  210. BackThemeColorIndex =1
  211. BackTint =100.0
  212. BackShade =85.0
  213. BorderColor =14136213
  214. HoverColor =15060409
  215. PressedColor =9592887
  216. HoverForeColor =4210752
  217. PressedForeColor =4210752
  218. WebImagePaddingLeft =2
  219. WebImagePaddingTop =2
  220. WebImagePaddingRight =1
  221. WebImagePaddingBottom =1
  222. End
  223. Begin Label
  224. OverlapFlags =93
  225. Left =965
  226. Top =850
  227. Width =4425
  228. Height =345
  229. BorderColor =8355711
  230. Name ="txt_ancdate"
  231. Caption ="Les données ci dessous sont valables depuis le "
  232. GridlineColor =10921638
  233. LayoutCachedLeft =965
  234. LayoutCachedTop =850
  235. LayoutCachedWidth =5390
  236. LayoutCachedHeight =1195
  237. ForeTint =100.0
  238. End
  239. Begin TextBox
  240. OverlapFlags =85
  241. IMESentenceMode =3
  242. Left =8787
  243. Top =853
  244. Width =1476
  245. Height =315
  246. ColumnOrder =1
  247. TabIndex =1
  248. BorderColor =10921638
  249. ForeColor =4210752
  250. Name ="DateInf"
  251. GridlineColor =10921638
  252. LayoutCachedLeft =8787
  253. LayoutCachedTop =853
  254. LayoutCachedWidth =10263
  255. LayoutCachedHeight =1168
  256. End
  257. Begin Label
  258. OverlapFlags =85
  259. Left =965
  260. Top =1255
  261. Width =7710
  262. Height =285
  263. BorderColor =8355711
  264. Name ="txt_nvdate"
  265. Caption ="Veuillez choisir la date à partir de laquelle les nouvelles données prendront e"
  266. "ffet:"
  267. GridlineColor =10921638
  268. LayoutCachedLeft =965
  269. LayoutCachedTop =1255
  270. LayoutCachedWidth =8675
  271. LayoutCachedHeight =1540
  272. ForeTint =100.0
  273. End
  274. Begin TextBox
  275. OverlapFlags =85
  276. IMESentenceMode =3
  277. Left =8787
  278. Top =1250
  279. Width =1474
  280. Height =315
  281. ColumnOrder =2
  282. TabIndex =2
  283. BorderColor =10921638
  284. ForeColor =4210752
  285. Name ="NvelleDate"
  286. Format ="Short Date"
  287. GridlineColor =10921638
  288. LayoutCachedLeft =8787
  289. LayoutCachedTop =1250
  290. LayoutCachedWidth =10261
  291. LayoutCachedHeight =1565
  292. End
  293. Begin Label
  294. OverlapFlags =85
  295. Left =963
  296. Top =1647
  297. Width =6480
  298. Height =345
  299. BorderColor =8355711
  300. Name ="txt_copie"
  301. Caption ="Voulez vous utiliser les anciennes données comme point de départ?"
  302. GridlineColor =10921638
  303. LayoutCachedLeft =963
  304. LayoutCachedTop =1647
  305. LayoutCachedWidth =7443
  306. LayoutCachedHeight =1992
  307. ForeTint =100.0
  308. End
  309. Begin ComboBox
  310. LimitToList = NotDefault
  311. RowSourceTypeInt =1
  312. OverlapFlags =85
  313. IMESentenceMode =3
  314. ColumnCount =2
  315. ListWidth =1442
  316. Left =8787
  317. Top =1647
  318. Width =1476
  319. Height =315
  320. ColumnOrder =3
  321. TabIndex =3
  322. BorderColor =10921638
  323. ForeColor =4138256
  324. Name ="CopieAnc"
  325. RowSourceType ="Value List"
  326. RowSource ="1;\"Oui\";0;\"Non\""
  327. ColumnWidths ="0;1442"
  328. GridlineColor =10921638
  329. LayoutCachedLeft =8787
  330. LayoutCachedTop =1647
  331. LayoutCachedWidth =10263
  332. LayoutCachedHeight =1962
  333. End
  334. Begin TextBox
  335. Locked = NotDefault
  336. FontItalic = NotDefault
  337. OldBorderStyle =0
  338. OverlapFlags =93
  339. BackStyle =0
  340. IMESentenceMode =3
  341. Left =11622
  342. Top =56
  343. Width =501
  344. Height =315
  345. ColumnOrder =4
  346. FontSize =9
  347. TabIndex =4
  348. BorderColor =10921638
  349. ForeColor =4210752
  350. Name ="PeriodeValidite"
  351. ControlSource ="PeriodeValidite"
  352. StatusBarText ="cf. tbl_PeriodeAgent"
  353. GridlineColor =10921638
  354. LayoutCachedLeft =11622
  355. LayoutCachedTop =56
  356. LayoutCachedWidth =12123
  357. LayoutCachedHeight =371
  358. End
  359. Begin CommandButton
  360. OverlapFlags =85
  361. Left =10431
  362. Top =1647
  363. Width =1077
  364. TabIndex =5
  365. ForeColor =4210752
  366. Name ="CmdOK"
  367. Caption ="OK"
  368. OnClick ="[Event Procedure]"
  369. GridlineColor =10921638
  370. LayoutCachedLeft =10431
  371. LayoutCachedTop =1647
  372. LayoutCachedWidth =11508
  373. LayoutCachedHeight =1930
  374. Gradient =0
  375. BackColor =15921906
  376. BackThemeColorIndex =1
  377. BackTint =100.0
  378. BackShade =95.0
  379. BorderColor =14136213
  380. HoverColor =15060409
  381. PressedColor =9592887
  382. HoverForeColor =4210752
  383. PressedForeColor =4210752
  384. WebImagePaddingLeft =2
  385. WebImagePaddingTop =2
  386. WebImagePaddingRight =1
  387. WebImagePaddingBottom =1
  388. End
  389. Begin Label
  390. Visible = NotDefault
  391. OverlapFlags =215
  392. Left =963
  393. Top =567
  394. Width =6855
  395. Height =630
  396. BorderColor =8355711
  397. Name ="txt_edition"
  398. Caption ="Veuillez renseigner ci dessous les nouvelles informations de l'agent. Elles sero"
  399. "nt prises en compte à partir du:"
  400. GridlineColor =10921638
  401. LayoutCachedLeft =963
  402. LayoutCachedTop =567
  403. LayoutCachedWidth =7818
  404. LayoutCachedHeight =1197
  405. ForeTint =100.0
  406. End
  407. Begin Label
  408. FontItalic = NotDefault
  409. OverlapFlags =247
  410. Left =9411
  411. Top =56
  412. Width =2385
  413. Height =225
  414. FontSize =9
  415. BorderColor =8355711
  416. ForeColor =8355711
  417. Name ="Étiquette46"
  418. Caption ="Code de la période affichée:"
  419. GridlineColor =10921638
  420. LayoutCachedLeft =9411
  421. LayoutCachedTop =56
  422. LayoutCachedWidth =11796
  423. LayoutCachedHeight =281
  424. End
  425. Begin TextBox
  426. OldBorderStyle =0
  427. OverlapFlags =215
  428. BackStyle =0
  429. IMESentenceMode =3
  430. Left =3174
  431. Width =3696
  432. Height =315
  433. ColumnWidth =2790
  434. ColumnOrder =0
  435. FontSize =13
  436. TabIndex =6
  437. BorderColor =10921638
  438. Name ="NomBareme"
  439. ControlSource ="NomBareme"
  440. GridlineColor =10921638
  441. LayoutCachedLeft =3174
  442. LayoutCachedWidth =6870
  443. LayoutCachedHeight =315
  444. ForeTint =100.0
  445. End
  446. End
  447. End
  448. Begin Section
  449. Height =453
  450. BackColor =14211288
  451. Name ="Détail"
  452. AlternateBackColor =15921906
  453. AlternateBackThemeColorIndex =1
  454. AlternateBackShade =95.0
  455. Begin
  456. Begin TextBox
  457. OverlapFlags =85
  458. IMESentenceMode =3
  459. Left =1190
  460. Top =56
  461. Width =1086
  462. Height =315
  463. BorderColor =10921638
  464. ForeColor =4210752
  465. Name ="BorneInf"
  466. ControlSource ="BorneInf"
  467. GridlineColor =10921638
  468. LayoutCachedLeft =1190
  469. LayoutCachedTop =56
  470. LayoutCachedWidth =2276
  471. LayoutCachedHeight =371
  472. End
  473. Begin TextBox
  474. OverlapFlags =85
  475. IMESentenceMode =3
  476. Left =2777
  477. Top =56
  478. Width =1026
  479. Height =315
  480. TabIndex =1
  481. BorderColor =10921638
  482. ForeColor =4210752
  483. Name ="BorneSup"
  484. ControlSource ="BorneSup"
  485. GridlineColor =10921638
  486. LayoutCachedLeft =2777
  487. LayoutCachedTop =56
  488. LayoutCachedWidth =3803
  489. LayoutCachedHeight =371
  490. End
  491. Begin TextBox
  492. OverlapFlags =85
  493. IMESentenceMode =3
  494. Left =3911
  495. Top =56
  496. Width =786
  497. Height =315
  498. TabIndex =2
  499. BorderColor =10921638
  500. ForeColor =4210752
  501. Name ="UniteBornes"
  502. ControlSource ="UniteBornes"
  503. GridlineColor =10921638
  504. LayoutCachedLeft =3911
  505. LayoutCachedTop =56
  506. LayoutCachedWidth =4697
  507. LayoutCachedHeight =371
  508. End
  509. Begin TextBox
  510. OverlapFlags =85
  511. IMESentenceMode =3
  512. Left =5612
  513. Top =56
  514. Height =315
  515. TabIndex =3
  516. BorderColor =10921638
  517. ForeColor =4210752
  518. Name ="Valeur"
  519. ControlSource ="Valeur"
  520. GridlineColor =10921638
  521. LayoutCachedLeft =5612
  522. LayoutCachedTop =56
  523. LayoutCachedWidth =7313
  524. LayoutCachedHeight =371
  525. End
  526. Begin TextBox
  527. OverlapFlags =85
  528. IMESentenceMode =3
  529. Left =7426
  530. Top =56
  531. Width =636
  532. Height =315
  533. TabIndex =4
  534. BorderColor =10921638
  535. ForeColor =4210752
  536. Name ="UniteValeur"
  537. ControlSource ="UniteValeur"
  538. GridlineColor =10921638
  539. LayoutCachedLeft =7426
  540. LayoutCachedTop =56
  541. LayoutCachedWidth =8062
  542. LayoutCachedHeight =371
  543. End
  544. Begin Label
  545. OverlapFlags =85
  546. Left =623
  547. Top =56
  548. Width =450
  549. Height =315
  550. BorderColor =8355711
  551. Name ="Étiquette0"
  552. Caption ="De: "
  553. GridlineColor =10921638
  554. LayoutCachedLeft =623
  555. LayoutCachedTop =56
  556. LayoutCachedWidth =1073
  557. LayoutCachedHeight =371
  558. ForeTint =100.0
  559. End
  560. Begin Label
  561. OverlapFlags =85
  562. Left =2324
  563. Top =56
  564. Width =390
  565. Height =315
  566. BorderColor =8355711
  567. Name ="Étiquette1"
  568. Caption ="à:"
  569. GridlineColor =10921638
  570. LayoutCachedLeft =2324
  571. LayoutCachedTop =56
  572. LayoutCachedWidth =2714
  573. LayoutCachedHeight =371
  574. ForeTint =100.0
  575. End
  576. Begin Label
  577. OverlapFlags =85
  578. Left =4818
  579. Top =56
  580. Width =690
  581. Height =315
  582. BorderColor =8355711
  583. Name ="Étiquette3"
  584. Caption ="=>"
  585. GridlineColor =10921638
  586. LayoutCachedLeft =4818
  587. LayoutCachedTop =56
  588. LayoutCachedWidth =5508
  589. LayoutCachedHeight =371
  590. ForeTint =100.0
  591. End
  592. Begin CommandButton
  593. OverlapFlags =85
  594. Left =8220
  595. Top =56
  596. Width =1922
  597. TabIndex =5
  598. ForeColor =4210752
  599. Name ="InserLigne"
  600. Caption ="Insérer une ligne"
  601. OnClick ="[Event Procedure]"
  602. GridlineColor =10921638
  603. LayoutCachedLeft =8220
  604. LayoutCachedTop =56
  605. LayoutCachedWidth =10142
  606. LayoutCachedHeight =339
  607. Gradient =0
  608. BackColor =15921906
  609. BackThemeColorIndex =1
  610. BackTint =100.0
  611. BackShade =95.0
  612. BorderColor =14136213
  613. HoverColor =15060409
  614. PressedColor =9592887
  615. HoverForeColor =4210752
  616. PressedForeColor =4210752
  617. WebImagePaddingLeft =2
  618. WebImagePaddingTop =2
  619. WebImagePaddingRight =1
  620. WebImagePaddingBottom =1
  621. End
  622. Begin CommandButton
  623. OverlapFlags =85
  624. Left =10204
  625. Top =56
  626. Width =1922
  627. TabIndex =6
  628. ForeColor =4210752
  629. Name ="SupprLigne"
  630. Caption ="Supprimer la ligne"
  631. OnClick ="[Event Procedure]"
  632. GridlineColor =10921638
  633. LayoutCachedLeft =10204
  634. LayoutCachedTop =56
  635. LayoutCachedWidth =12126
  636. LayoutCachedHeight =339
  637. Gradient =0
  638. BackColor =15921906
  639. BackThemeColorIndex =1
  640. BackTint =100.0
  641. BackShade =95.0
  642. BorderColor =14136213
  643. HoverColor =15060409
  644. PressedColor =9592887
  645. HoverForeColor =4210752
  646. PressedForeColor =4210752
  647. WebImagePaddingLeft =2
  648. WebImagePaddingTop =2
  649. WebImagePaddingRight =1
  650. WebImagePaddingBottom =1
  651. End
  652. End
  653. End
  654. Begin FormFooter
  655. Height =0
  656. BackColor =14211288
  657. Name ="PiedFormulaire"
  658. AlternateBackThemeColorIndex =1
  659. AlternateBackShade =95.0
  660. End
  661. End
  662. End
  663. CodeBehindForm
  664. Attribute VB_GlobalNameSpace = False
  665. Attribute VB_Creatable = True
  666. Attribute VB_PredeclaredId = True
  667. Attribute VB_Exposed = False
  668. Option Compare Database
  669. Private Sub CmdOK_Click()
  670. Dim rs As DAO.Recordset
  671. Dim NvPeriode, copie, i, j, k As Integer
  672. Dim NvelleDate As Date
  673. Dim NomBareme As String
  674. Dim ACopier() As Variant
  675. NomBareme = Me.NomBareme
  676. If IsNull(Me.NvelleDate) Then
  677. MsgBox "Vous devez choisir une date de début pour la nouvelle période."
  678. Me.NvelleDate.BackColor = 33023
  679. Exit Sub
  680. End If
  681. NvelleDate = CDate(Me.NvelleDate)
  682. copie = Nz(Me.CopieAnc.Column(0), 1)
  683. NvPeriode = NvellePeriode("tbl_PeriodeBareme", NomBareme, NvelleDate)
  684. If NvPeriode = 0 Then Exit Sub
  685. Call VerrouMAJbareme(0)
  686. Set rs = CurrentDb.OpenRecordset("SELECT * FROM tbl_baremes WHERE [NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & Me.PeriodeValidite & ";")
  687. If rs.RecordCount = 0 Then copie = 0
  688. rs.MoveLast
  689. rs.MoveFirst
  690. ReDim ACopier(rs.Fields.Count - 1, rs.RecordCount)
  691. k = rs.RecordCount
  692. Do Until rs.EOF = True
  693. For i = 0 To rs.Fields.Count - 1
  694. 'on copie de toute façon le nom et le commentaire
  695. If rs.Fields(i).Name = "NomBareme" Or rs.Fields(i).Name = "Commentaire" Then
  696. ACopier(i, rs.AbsolutePosition) = rs.Fields(i)
  697. ElseIf rs.Fields(i).Name = "PeriodeValidite" Then
  698. ACopier(i, rs.AbsolutePosition) = NvPeriode
  699. Else
  700. If copie = 1 Then
  701. ACopier(i, rs.AbsolutePosition) = rs.Fields(i)
  702. Else
  703. ACopier(i, rs.AbsolutePosition) = Null
  704. End If
  705. End If
  706. Next i
  707. rs.MoveNext
  708. Loop
  709. Set rs = Nothing
  710. 'création d'une ou plusieurs nouvelle(s) ligne(s) dans la table tbl_baremes
  711. Set rs = CurrentDb.OpenRecordset("tbl_baremes")
  712. For j = 0 To k - 1
  713. rs.AddNew
  714. For i = 0 To rs.Fields.Count - 1
  715. rs.Fields(i) = ACopier(i, j)
  716. Next i
  717. rs.Update
  718. Next j
  719. 'on place l'enregistrement du formulaire sur ce nouvel enregistrement
  720. Me.FilterOn = False
  721. Me.Filter = "[NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & NvPeriode
  722. Me.FilterOn = True
  723. Call CreerMsg(11, , NomBareme, NvPeriode)
  724. Me.Refresh
  725. Call VerrouMAJbareme(2)
  726. End Sub
  727. Private Sub Form_AfterUpdate()
  728. Me.Requery
  729. Me.Refresh
  730. Me.DateInf = DLookup("[DateInf]", "[tbl_periodebareme]", "[NomBareme]='" & Me.NomBareme & "' AND [CodePeriode]=" & Me.PeriodeValidite)
  731. End Sub
  732. Private Sub Form_Open(Cancel As Integer)
  733. Me.NvelleDate = "01/" & Format(Month(Now()), "00") & "/" & Year(Now())
  734. Me.CopieAnc = 1
  735. Me.DateInf = DLookup("[DateInf]", "[tbl_periodebareme]", "[NomBareme]='" & Me.NomBareme & "' AND [CodePeriode]=" & Me.PeriodeValidite)
  736. Call VerrouMAJbareme(1)
  737. End Sub
  738. Private Sub InserLigne_Click()
  739. Dim NomBareme, UniteBornes, UniteValeur, commentaire As String
  740. Dim PeriodeValidite As Integer
  741. Dim BorneInf, Valeur As Double
  742. Dim rs As DAO.Recordset
  743. If IsNull(NomBareme) Or IsNull(PeriodeValidite) Or IsNull(Valeur) Then
  744. MsgBox "Erreur: certains paramètres sont manquants"
  745. Exit Sub
  746. End If
  747. NomBareme = Me.NomBareme
  748. PeriodeValidite = Me.PeriodeValidite
  749. UniteBornes = Nz(Me.UniteBornes, "")
  750. UniteValeur = Nz(Me.UniteValeur, "")
  751. BorneInf = Nz(Me.BorneInf, 0)
  752. Valeur = Nz(Me.Valeur, 0)
  753. commentaire = Nz(DLookup("Commentaire", "tbl_baremes", "[NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & PeriodeValidite), "")
  754. Set rs = CurrentDb.OpenRecordset("tbl_baremes")
  755. rs.AddNew
  756. rs![NomBareme] = NomBareme
  757. rs![PeriodeValidite] = PeriodeValidite
  758. rs![UniteBornes] = UniteBornes
  759. rs![UniteValeur] = UniteValeur
  760. rs![BorneInf] = BorneInf
  761. rs![BorneSup] = BorneInf
  762. rs![Valeur] = Valeur
  763. rs![commentaire] = commentaire
  764. rs.Update
  765. Me.Requery
  766. Me.Refresh
  767. End Sub
  768. Private Sub SupprLigne_Click()
  769. Dim NomBareme, sql As String
  770. Dim PeriodeValidite, compte, avertissement As Integer
  771. Dim BorneInf, Valeur As Double
  772. NomBareme = Me.NomBareme
  773. PeriodeValidite = Me.PeriodeValidite
  774. BorneInf = Nz(Me.BorneInf, -1)
  775. BorneSup = Nz(Me.BorneSup, -1)
  776. Valeur = Nz(Me.Valeur, 0)
  777. compte = Nz(DCount("NomBareme", "tbl_baremes", "[NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & PeriodeValidite), 0)
  778. Select Case compte
  779. Case 0
  780. MsgBox "Erreur: aucune ligne trouvée"
  781. Exit Sub
  782. Case 1
  783. MsgBox "Vous ne pouvez supprimer une ligne d'un barème que si celui-ci présente plusieurs lignes."
  784. Exit Sub
  785. Case Is > 1
  786. avertissement = DLookup("[valeur]", "tbl_parametre", "[parametre]='avertSQL'")
  787. If avertissement = 0 Then DoCmd.SetWarnings False
  788. If BorneInf = -1 And BorneSup = -1 Then
  789. sql = "DELETE * FROM tbl_Baremes WHERE [NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & PeriodeValidite & " AND [Valeur] = " & Valeur & ";"
  790. ElseIf BorneInf >= 0 And BorneSup = -1 Then
  791. sql = "DELETE * FROM tbl_Baremes WHERE [NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & PeriodeValidite & " AND [Valeur] = " & Valeur & " AND [BorneInf]=" & BorneInf & ";"
  792. ElseIf BorneInf >= 0 And BorneSup >= 0 Then
  793. sql = "DELETE * FROM tbl_Baremes WHERE [NomBareme]='" & NomBareme & "' AND [PeriodeValidite]=" & PeriodeValidite & " AND [Valeur] = " & Valeur & " AND [BorneInf]=" & BorneInf & " AND [BorneSup]=" & BorneSup & ";"
  794. End If
  795. DoCmd.RunSQL sql
  796. DoCmd.SetWarnings True
  797. Me.Refresh
  798. End Select
  799. End Sub