frm_SuiviVersions.bas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. Version =20
  2. VersionRequired =20
  3. Begin Form
  4. AllowDeletions = NotDefault
  5. DividingLines = NotDefault
  6. AllowAdditions = NotDefault
  7. AllowDesignChanges = NotDefault
  8. PictureAlignment =2
  9. DatasheetGridlinesBehavior =3
  10. GridY =10
  11. Width =18481
  12. DatasheetFontHeight =11
  13. ItemSuffix =17
  14. Right =16665
  15. Bottom =7890
  16. DatasheetGridlinesColor =15062992
  17. RecSrcDt = Begin
  18. 0xc8ae16b46f22e440
  19. End
  20. RecordSource ="SELECT ztblVersion.VERSION, ztblVersion.VERSION_lb, ztblVersion.Modifie_par, ztb"
  21. "lVersion.Valide_par, ztblVersion.Valide_le, ztblVersion.Modifications FROM ztblV"
  22. "ersion ORDER BY ztblVersion.VERSION DESC; "
  23. OnCurrent ="[Event Procedure]"
  24. DatasheetFontName ="Calibri"
  25. FilterOnLoad =0
  26. DatasheetBackColor12 =-2147483643
  27. ShowPageMargins =0
  28. DisplayOnSharePointSite =1
  29. DatasheetAlternateBackColor =16053492
  30. DatasheetGridlinesColor12 =15062992
  31. FitToScreen =1
  32. Begin
  33. Begin Label
  34. BackStyle =0
  35. FontSize =11
  36. FontName ="Calibri"
  37. ThemeFontIndex =1
  38. BackThemeColorIndex =1
  39. BorderThemeColorIndex =1
  40. ForeThemeColorIndex =2
  41. ForeTint =60.0
  42. GridlineThemeColorIndex =1
  43. GridlineShade =65.0
  44. End
  45. Begin CommandButton
  46. Width =1701
  47. Height =283
  48. FontSize =11
  49. FontWeight =400
  50. FontName ="Calibri"
  51. ForeThemeColorIndex =2
  52. ForeShade =50.0
  53. GridlineThemeColorIndex =1
  54. GridlineShade =65.0
  55. BackColor =-2147483633
  56. BorderLineStyle =0
  57. BorderThemeColorIndex =3
  58. BorderShade =90.0
  59. ThemeFontIndex =1
  60. End
  61. Begin TextBox
  62. FELineBreak = NotDefault
  63. BorderLineStyle =0
  64. Width =1701
  65. LabelX =-1701
  66. FontSize =11
  67. FontName ="Calibri"
  68. AsianLineBreak =1
  69. BackThemeColorIndex =1
  70. BorderThemeColorIndex =3
  71. BorderShade =90.0
  72. ThemeFontIndex =1
  73. ForeThemeColorIndex =2
  74. ForeShade =50.0
  75. GridlineThemeColorIndex =1
  76. GridlineShade =65.0
  77. End
  78. Begin ComboBox
  79. BorderLineStyle =0
  80. Width =1701
  81. LabelX =-1701
  82. FontSize =11
  83. FontName ="Calibri"
  84. AllowValueListEdits =1
  85. InheritValueList =1
  86. ThemeFontIndex =1
  87. BackThemeColorIndex =1
  88. BorderThemeColorIndex =3
  89. BorderShade =90.0
  90. ForeThemeColorIndex =2
  91. ForeShade =50.0
  92. GridlineThemeColorIndex =1
  93. GridlineShade =65.0
  94. End
  95. Begin FormHeader
  96. Height =963
  97. BackColor =12566463
  98. Name ="EntêteFormulaire"
  99. AlternateBackThemeColorIndex =1
  100. AlternateBackShade =95.0
  101. Begin
  102. Begin Label
  103. OverlapFlags =85
  104. Left =226
  105. Top =566
  106. Width =960
  107. Height =315
  108. BorderColor =16777215
  109. Name ="Étiquette0"
  110. Caption ="VERSION:"
  111. GridlineColor =10921638
  112. LayoutCachedLeft =226
  113. LayoutCachedTop =566
  114. LayoutCachedWidth =1186
  115. LayoutCachedHeight =881
  116. ForeThemeColorIndex =0
  117. ForeTint =100.0
  118. End
  119. Begin Label
  120. OverlapFlags =85
  121. Left =2380
  122. Top =623
  123. Width =1215
  124. Height =315
  125. BorderColor =16777215
  126. Name ="Étiquette2"
  127. Caption ="Modifié par:"
  128. GridlineColor =10921638
  129. LayoutCachedLeft =2380
  130. LayoutCachedTop =623
  131. LayoutCachedWidth =3595
  132. LayoutCachedHeight =938
  133. ForeThemeColorIndex =0
  134. ForeTint =100.0
  135. End
  136. Begin Label
  137. OverlapFlags =85
  138. Left =4421
  139. Top =623
  140. Width =1080
  141. Height =315
  142. BorderColor =16777215
  143. Name ="Étiquette4"
  144. Caption ="Validé par:"
  145. GridlineColor =10921638
  146. LayoutCachedLeft =4421
  147. LayoutCachedTop =623
  148. LayoutCachedWidth =5501
  149. LayoutCachedHeight =938
  150. ForeThemeColorIndex =0
  151. ForeTint =100.0
  152. End
  153. Begin Label
  154. OverlapFlags =85
  155. Left =6179
  156. Top =623
  157. Width =960
  158. Height =315
  159. BorderColor =16777215
  160. Name ="Étiquette5"
  161. Caption ="Validé le:"
  162. GridlineColor =10921638
  163. LayoutCachedLeft =6179
  164. LayoutCachedTop =623
  165. LayoutCachedWidth =7139
  166. LayoutCachedHeight =938
  167. ForeThemeColorIndex =0
  168. ForeTint =100.0
  169. End
  170. Begin Label
  171. OverlapFlags =85
  172. Left =7653
  173. Top =623
  174. Width =1410
  175. Height =315
  176. BorderColor =16777215
  177. Name ="Étiquette6"
  178. Caption ="Modifications:"
  179. GridlineColor =10921638
  180. LayoutCachedLeft =7653
  181. LayoutCachedTop =623
  182. LayoutCachedWidth =9063
  183. LayoutCachedHeight =938
  184. ForeThemeColorIndex =0
  185. ForeTint =100.0
  186. End
  187. Begin Label
  188. OverlapFlags =93
  189. Left =623
  190. Top =56
  191. Width =5216
  192. Height =340
  193. FontSize =14
  194. FontWeight =700
  195. BorderColor =16777215
  196. Name ="Étiquette7"
  197. Caption ="Suivi des versions"
  198. GridlineColor =10921638
  199. LayoutCachedLeft =623
  200. LayoutCachedTop =56
  201. LayoutCachedWidth =5839
  202. LayoutCachedHeight =396
  203. ForeThemeColorIndex =0
  204. ForeTint =100.0
  205. End
  206. Begin CommandButton
  207. OverlapFlags =215
  208. Left =5499
  209. Top =56
  210. Width =1424
  211. Height =343
  212. ForeColor =4138256
  213. Name ="cmd_ajout"
  214. Caption ="Ajouter"
  215. OnClick ="[Event Procedure]"
  216. GridlineColor =10921638
  217. LayoutCachedLeft =5499
  218. LayoutCachedTop =56
  219. LayoutCachedWidth =6923
  220. LayoutCachedHeight =399
  221. BackColor =10855845
  222. BorderColor =12835293
  223. WebImagePaddingLeft =2
  224. WebImagePaddingTop =2
  225. WebImagePaddingRight =1
  226. WebImagePaddingBottom =1
  227. Overlaps =1
  228. End
  229. Begin CommandButton
  230. OverlapFlags =215
  231. Left =3798
  232. Top =56
  233. Width =1424
  234. Height =343
  235. TabIndex =1
  236. ForeColor =4138256
  237. Name ="cmd_actu"
  238. Caption ="Actualiser"
  239. OnClick ="[Event Procedure]"
  240. GridlineColor =10921638
  241. LayoutCachedLeft =3798
  242. LayoutCachedTop =56
  243. LayoutCachedWidth =5222
  244. LayoutCachedHeight =399
  245. BackColor =10855845
  246. BorderColor =12835293
  247. WebImagePaddingLeft =2
  248. WebImagePaddingTop =2
  249. WebImagePaddingRight =1
  250. WebImagePaddingBottom =1
  251. Overlaps =1
  252. End
  253. Begin CommandButton
  254. OverlapFlags =85
  255. Left =56
  256. Top =56
  257. Width =501
  258. Height =336
  259. TabIndex =2
  260. ForeColor =4210752
  261. Name ="Commande1"
  262. Caption ="Commande1"
  263. ControlTipText ="Fermer formulaire"
  264. GridlineColor =10921638
  265. OnClickEmMacro = Begin
  266. Version =196611
  267. ColumnsShown =8
  268. Begin
  269. Action ="Close"
  270. Argument ="-1"
  271. Argument =""
  272. Argument ="0"
  273. End
  274. Begin
  275. Comment ="_AXL:<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\015\012<UserI"
  276. "nterfaceMacro For=\"Commande1\" xmlns=\"http://schemas.microsoft.com/office/acce"
  277. "ssservices/2009/11/application\" xmlns:a=\"http://schemas.microsoft.com/office/a"
  278. "ccessservices/2009/11/forms\"><"
  279. End
  280. Begin
  281. Comment ="_AXL:Statements><Action Name=\"CloseWindow\"/></Statements></UserInterfaceMacro>"
  282. End
  283. End
  284. ImageData = Begin
  285. 0x2800000010000000100000000100200000000000000000000000000000000000 ,
  286. 0x0000000000000000000000000000000000000000000000000000000010081080 ,
  287. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  288. 0x000000000000000000000000000000000000000040485020100810e0104050ff ,
  289. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  290. 0x0000000000000000000000000000000040404080405860ff106890ff2080a0f0 ,
  291. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  292. 0x0000000000000000607070ff80a0b0ff4080a0ff20a0d0ff40a8e0ff2078a0ff ,
  293. 0x101020ff101020ff000000000000000000000000000000000000000000000000 ,
  294. 0x0000000000000000708890ffa0d8f0ff60d0ffff50c0f0ff30a8e0ff1080b0ff ,
  295. 0xe0d8d0ff102020ff000000000000000000000000000000000000000000000000 ,
  296. 0x0000000000000000708890ffb0e8f0ff80e0ffff60c8f0ff50b8f0ff1088c0ff ,
  297. 0xf0d8d0ff202830ff000000000000000090482030904820ff0000000000000000 ,
  298. 0x0000000000000000808890ffb0e8f0ff80e0ffff60d0ffff404050ff1090c0ff ,
  299. 0xf0e0d0ff303840ff0000000090482030a05030ffa05020ff0000000000000000 ,
  300. 0x00000000000000008090a0ffc0f0ffff90e0ffff70d8ffff60c8f0ff0090c0ff ,
  301. 0xf0e0e0ff404050ff90482030a05030ffd07840ffb05830ffa05020ffa04820ff ,
  302. 0x904820ff904820ff8090a0ffc0f0ffffa0e8ffff80d8ffff70d0f0ff40b0e0ff ,
  303. 0xf0e8e0ff605050ffa05830ffe08860fff09060fff08850ffe07850ffd07040ff ,
  304. 0xb06840ff904820ff8098a0ffc0f0ffffa0e8ffff90e8ffff80e0ffff80b8d0ff ,
  305. 0xf0e8e0ffe09870ffffc0a0ffffb090ffffa070fff09060fff08850ffe07850ff ,
  306. 0xd07040ffa05020ff8098a0ffc0f0ffffc0f8ffffa0e0f0ff90a8b0ffc0c8d0ff ,
  307. 0xf0f0e0ff908080fff0a070ffffc0a0ffffb090ffffb090ffffa880fff0a080ff ,
  308. 0xe09870ffb05030ff90a0a0ffe0f8ffffb0c8d0ff90a0b0fff0f0f0fffff8f0ff ,
  309. 0xf0f0f0ff607080ffe0987050f0a070ffffc0a0ffd06830ffe09870ffe09060ff ,
  310. 0xe08860ffe08050ff90a0b0ff90a8b0ffc0c8d0ffffffffffffffffffffffffff ,
  311. 0xffffffff708890ff00000000e0987050e09870ffd07040ff0000000000000000 ,
  312. 0x000000000000000090a0b0ff90a0b0ff90a0b0ff90a0b0ff90a0a0ff8098a0ff ,
  313. 0x8098a0ff9098a0ff0000000000000000e0987050e09870ff0000000000000000 ,
  314. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  315. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  316. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  317. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  318. 0x0000000000000000
  319. End
  320. LayoutCachedLeft =56
  321. LayoutCachedTop =56
  322. LayoutCachedWidth =557
  323. LayoutCachedHeight =392
  324. ForeThemeColorIndex =0
  325. ForeTint =75.0
  326. ForeShade =100.0
  327. UseTheme =1
  328. Shape =1
  329. BackColor =16183539
  330. BorderColor =12029087
  331. BorderThemeColorIndex =-1
  332. BorderShade =100.0
  333. HoverColor =15060409
  334. HoverThemeColorIndex =4
  335. HoverTint =40.0
  336. PressedColor =9592887
  337. PressedThemeColorIndex =4
  338. PressedShade =75.0
  339. HoverForeColor =4210752
  340. HoverForeThemeColorIndex =0
  341. HoverForeTint =75.0
  342. PressedForeColor =4210752
  343. PressedForeThemeColorIndex =0
  344. PressedForeTint =75.0
  345. WebImagePaddingLeft =2
  346. WebImagePaddingTop =2
  347. WebImagePaddingRight =1
  348. WebImagePaddingBottom =1
  349. End
  350. End
  351. End
  352. Begin Section
  353. Height =510
  354. BackColor =15527148
  355. Name ="Détail"
  356. AlternateBackColor =12566463
  357. Begin
  358. Begin TextBox
  359. BorderWidth =2
  360. OverlapFlags =85
  361. IMESentenceMode =3
  362. Left =226
  363. Top =56
  364. Width =1266
  365. Height =315
  366. BorderColor =12835293
  367. ForeColor =4138256
  368. Name ="VERSION"
  369. ControlSource ="VERSION"
  370. Format ="Short Date"
  371. StatusBarText ="Date de la version (JJ/MM/AAAA)"
  372. AfterUpdate ="[Event Procedure]"
  373. GridlineColor =10921638
  374. LayoutCachedLeft =226
  375. LayoutCachedTop =56
  376. LayoutCachedWidth =1492
  377. LayoutCachedHeight =371
  378. End
  379. Begin TextBox
  380. BorderWidth =2
  381. OverlapFlags =85
  382. IMESentenceMode =3
  383. Left =1587
  384. Top =56
  385. Width =681
  386. Height =315
  387. TabIndex =5
  388. BorderColor =12835293
  389. ForeColor =4138256
  390. Name ="VERSION_lb"
  391. ControlSource ="VERSION_lb"
  392. StatusBarText ="Libellé de la version"
  393. AfterUpdate ="[Event Procedure]"
  394. GridlineColor =10921638
  395. LayoutCachedLeft =1587
  396. LayoutCachedTop =56
  397. LayoutCachedWidth =2268
  398. LayoutCachedHeight =371
  399. End
  400. Begin TextBox
  401. BorderWidth =2
  402. OverlapFlags =85
  403. IMESentenceMode =3
  404. Left =2437
  405. Top =56
  406. Height =315
  407. TabIndex =1
  408. BorderColor =12835293
  409. ForeColor =4138256
  410. Name ="Modifie_par"
  411. ControlSource ="Modifie_par"
  412. GridlineColor =10921638
  413. LayoutCachedLeft =2437
  414. LayoutCachedTop =56
  415. LayoutCachedWidth =4138
  416. LayoutCachedHeight =371
  417. End
  418. Begin TextBox
  419. BorderWidth =2
  420. OverlapFlags =85
  421. IMESentenceMode =3
  422. Left =4478
  423. Top =56
  424. Height =315
  425. TabIndex =2
  426. BorderColor =12835293
  427. ForeColor =4138256
  428. Name ="Valide_par"
  429. ControlSource ="Valide_par"
  430. GridlineColor =10921638
  431. LayoutCachedLeft =4478
  432. LayoutCachedTop =56
  433. LayoutCachedWidth =6179
  434. LayoutCachedHeight =371
  435. End
  436. Begin TextBox
  437. BorderWidth =2
  438. OverlapFlags =85
  439. IMESentenceMode =3
  440. Left =6235
  441. Top =56
  442. Width =1251
  443. Height =315
  444. TabIndex =3
  445. BorderColor =12835293
  446. ForeColor =4138256
  447. Name ="Valide_le"
  448. ControlSource ="Valide_le"
  449. Format ="Short Date"
  450. GridlineColor =10921638
  451. LayoutCachedLeft =6235
  452. LayoutCachedTop =56
  453. LayoutCachedWidth =7486
  454. LayoutCachedHeight =371
  455. End
  456. Begin TextBox
  457. EnterKeyBehavior = NotDefault
  458. ScrollBars =2
  459. BorderWidth =2
  460. OverlapFlags =85
  461. IMESentenceMode =3
  462. Left =7710
  463. Top =56
  464. Width =7485
  465. Height =333
  466. ColumnWidth =7215
  467. TabIndex =4
  468. BorderColor =12835293
  469. ForeColor =4138256
  470. Name ="Modifications"
  471. ControlSource ="Modifications"
  472. StatusBarText ="Modifications apportées par la nouvelle version"
  473. GridlineColor =10921638
  474. LayoutCachedLeft =7710
  475. LayoutCachedTop =56
  476. LayoutCachedWidth =15195
  477. LayoutCachedHeight =389
  478. End
  479. Begin CommandButton
  480. OverlapFlags =85
  481. Left =15363
  482. Top =56
  483. Width =1134
  484. Height =340
  485. TabIndex =6
  486. ForeColor =4138256
  487. Name ="cmd_valider"
  488. Caption ="Valider"
  489. OnClick ="[Event Procedure]"
  490. GridlineColor =10921638
  491. LayoutCachedLeft =15363
  492. LayoutCachedTop =56
  493. LayoutCachedWidth =16497
  494. LayoutCachedHeight =396
  495. BackColor =10855845
  496. BorderColor =16777215
  497. BorderThemeColorIndex =-1
  498. BorderShade =100.0
  499. WebImagePaddingLeft =2
  500. WebImagePaddingTop =2
  501. WebImagePaddingRight =1
  502. WebImagePaddingBottom =1
  503. End
  504. Begin CommandButton
  505. OverlapFlags =85
  506. Left =16781
  507. Top =56
  508. Width =1314
  509. Height =340
  510. TabIndex =7
  511. ForeColor =4138256
  512. Name ="cmd_suppr"
  513. Caption ="Supprimer"
  514. OnClick ="[Event Procedure]"
  515. GridlineColor =10921638
  516. LayoutCachedLeft =16781
  517. LayoutCachedTop =56
  518. LayoutCachedWidth =18095
  519. LayoutCachedHeight =396
  520. BackColor =10855845
  521. BorderColor =16777215
  522. BorderThemeColorIndex =-1
  523. BorderShade =100.0
  524. WebImagePaddingLeft =2
  525. WebImagePaddingTop =2
  526. WebImagePaddingRight =1
  527. WebImagePaddingBottom =1
  528. End
  529. End
  530. End
  531. Begin FormFooter
  532. Height =453
  533. BackColor =10855845
  534. Name ="PiedFormulaire"
  535. AlternateBackThemeColorIndex =1
  536. AlternateBackShade =95.0
  537. Begin
  538. Begin Label
  539. Visible = NotDefault
  540. OverlapFlags =93
  541. Left =113
  542. Top =56
  543. Width =5783
  544. Height =284
  545. BorderColor =16777215
  546. Name ="txt_npo"
  547. Caption ="NPO: Mettre à jour la table tbl_parametre"
  548. GridlineColor =10921638
  549. LayoutCachedLeft =113
  550. LayoutCachedTop =56
  551. LayoutCachedWidth =5896
  552. LayoutCachedHeight =340
  553. ForeThemeColorIndex =-1
  554. ForeTint =100.0
  555. End
  556. Begin CommandButton
  557. Visible = NotDefault
  558. OverlapFlags =215
  559. Left =4422
  560. Top =56
  561. Width =1417
  562. Height =329
  563. ForeColor =4138256
  564. Name ="cmd_acces"
  565. Caption ="Accès"
  566. OnClick ="[Event Procedure]"
  567. GridlineColor =10921638
  568. LayoutCachedLeft =4422
  569. LayoutCachedTop =56
  570. LayoutCachedWidth =5839
  571. LayoutCachedHeight =385
  572. BorderColor =12835293
  573. WebImagePaddingLeft =2
  574. WebImagePaddingTop =2
  575. WebImagePaddingRight =1
  576. WebImagePaddingBottom =1
  577. Overlaps =1
  578. End
  579. End
  580. End
  581. End
  582. End
  583. CodeBehindForm
  584. Attribute VB_GlobalNameSpace = False
  585. Attribute VB_Creatable = True
  586. Attribute VB_PredeclaredId = True
  587. Attribute VB_Exposed = False
  588. Option Compare Database
  589. Private Sub cmd_acces_Click()
  590. DoCmd.OpenTable "tbl_parametre"
  591. End Sub
  592. Private Sub cmd_actu_Click()
  593. Me.Requery
  594. Me.Refresh
  595. End Sub
  596. Private Sub cmd_suppr_Click()
  597. Dim k1, k2 As Integer
  598. Dim rs As DAO.Recordset
  599. Me.AllowDeletions = True
  600. Me.Refresh
  601. DoCmd.RunCommand acCmdDeleteRecord
  602. Me.AllowDeletions = False
  603. Call MAJ_Local(DLast("[VERSION_lb]", "ztblVersion", ""), DLast("[VERSION]", "ztblVersion", ""))
  604. Me.Refresh
  605. End Sub
  606. Private Sub cmd_valider_Click()
  607. Dim rs As DAO.Recordset
  608. Me.Valide_le = Date
  609. Me.Valide_par = Environ("USERNAME")
  610. Me.Refresh
  611. End Sub
  612. Private Sub cmd_ajout_Click()
  613. Dim rs As DAO.Recordset
  614. Dim k1, k2 As Integer
  615. Set rs = CurrentDb.OpenRecordset("ztblVersion")
  616. rs.AddNew
  617. rs![VERSION] = Date
  618. rs![VERSION_lb] = DLast("[VERSION_lb]", "ztblVersion", "")
  619. rs![Modifie_par] = Environ("USERNAME")
  620. rs![Modifications] = Nz(InputBox("Modifications apportées:"), "")
  621. rs.Update
  622. rs.Close
  623. Set rs = Nothing
  624. Call MAJ_Local(DLast("[VERSION_lb]", "ztblVersion", ""), Date)
  625. Me.Requery
  626. Me.Refresh
  627. End Sub
  628. Private Sub Commande14_Click()
  629. On Error GoTo Err_Commande14_Click
  630. If Me.Dirty Then Me.Dirty = False
  631. DoCmd.Close
  632. Exit_Commande14_Click:
  633. Exit Sub
  634. Err_Commande14_Click:
  635. MsgBox err.Description
  636. Resume Exit_Commande14_Click
  637. End Sub
  638. Private Sub Form_Current()
  639. If Not DCount("valeur", "tbl_parametre", "valeur='admin' AND valeur2='" & CurrentUser & "'") > 0 Then
  640. Me.cmd_ajout.Visible = False
  641. Me.cmd_suppr.Visible = False
  642. Me.cmd_valider.Visible = False
  643. Me.cmd_acces.Visible = False
  644. Me.txt_npo.Visible = False
  645. Me.VERSION.Locked = True
  646. Me.VERSION_lb.Locked = True
  647. Me.Modifie_par.Locked = True
  648. Me.Valide_le.Locked = True
  649. Me.Valide_par.Locked = True
  650. Me.Modifications.Locked = True
  651. End If
  652. End Sub
  653. Private Sub VERSION_AfterUpdate()
  654. Me.Requery
  655. Call MAJ_Local("", Me.VERSION)
  656. End Sub
  657. Private Sub VERSION_lb_AfterUpdate()
  658. Me.Requery
  659. Call MAJ_Local(Me.VERSION_lb)
  660. End Sub
  661. Sub MAJ_Local(VERSION_lb As String, Optional VERSION As String)
  662. Dim rs As DAO.Recordset
  663. Dim k1, k2 As Integer
  664. k1 = 0
  665. k2 = 0
  666. If Not Len(VERSION_lb) > 0 Then k2 = 1
  667. 'If VERSION > #1/1/1990# Then k1 = 1
  668. If Not Len(VERSION) > 0 Then k1 = 1
  669. If k1 = 1 And k2 = 1 Then Exit Sub
  670. If MsgBox("Mettre à jour la table tbl_parametre (local)?", vbYesNo) = vbNo Then Exit Sub
  671. 'mise à jour des champs s'il existent
  672. Set rs = CurrentDb.OpenRecordset("tbl_parametre")
  673. rs.MoveFirst
  674. Do Until rs.EOF = True
  675. If k1 = 0 And rs![parametre] = "VERSION" Then
  676. rs.Edit
  677. rs![Valeur] = VERSION
  678. rs.Update
  679. k1 = 1
  680. End If
  681. If k2 = 0 And rs![parametre] = "VERSION_lb" Then
  682. rs.Edit
  683. rs![Valeur] = VERSION_lb
  684. rs.Update
  685. k2 = 1
  686. End If
  687. rs.MoveNext
  688. Loop
  689. 'création s'ils sont manquants
  690. If k1 = 0 Then
  691. rs.AddNew
  692. rs![parametre] = "VERSION"
  693. rs![Valeur] = VERSION
  694. rs.Update
  695. End If
  696. If k2 = 0 Then
  697. rs.AddNew
  698. rs![parametre] = "VERSION_lb"
  699. rs![Valeur] = VERSION_lb
  700. rs.Update
  701. End If
  702. rs.Close
  703. 'message "nouvelle version"
  704. Call CreerMsg(21)
  705. End Sub