frm_NouvelAgent.bas 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  1. Version =20
  2. VersionRequired =20
  3. Begin Form
  4. DividingLines = NotDefault
  5. AllowDesignChanges = NotDefault
  6. DefaultView =0
  7. PictureAlignment =2
  8. DatasheetGridlinesBehavior =3
  9. GridY =10
  10. Width =12703
  11. DatasheetFontHeight =11
  12. ItemSuffix =56
  13. Right =15330
  14. Bottom =12345
  15. DatasheetGridlinesColor =14806254
  16. Filter ="[CodeAgent]='AAA' AND [PeriodeValidite]=1"
  17. RecSrcDt = Begin
  18. 0x76711b6daf39e440
  19. End
  20. RecordSource ="SELECT tbl_Agents.CodeAgent, tbl_Agents.Nom, tbl_Agents.PeriodeValidite, tbl_Age"
  21. "nts.Grade, tbl_Agents.Catégorie, tbl_Agents.RémunérationBase, tbl_Agents.Groupe,"
  22. " tbl_Agents.ResidenceAdmin, tbl_Agents.ResidenceFamiliale, tbl_Agents.Telephone,"
  23. " tbl_Agents.Matricule, tbl_Agents.TypeVehicule, tbl_Agents.DateAutorisationVP, t"
  24. "bl_Agents.PuissanceFiscVP, tbl_Agents.NbKmAutorisesVP, tbl_Agents.TypeVirement F"
  25. "ROM tbl_Agents; "
  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 ListBox
  102. BorderLineStyle =0
  103. Width =1701
  104. Height =1417
  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 =0
  115. ForeTint =75.0
  116. GridlineThemeColorIndex =1
  117. GridlineShade =65.0
  118. End
  119. Begin ComboBox
  120. AddColon = NotDefault
  121. BorderLineStyle =0
  122. Width =1701
  123. LabelX =-1701
  124. FontSize =11
  125. FontName ="Calibri"
  126. AllowValueListEdits =1
  127. InheritValueList =1
  128. ThemeFontIndex =1
  129. BackThemeColorIndex =1
  130. BorderThemeColorIndex =1
  131. BorderShade =65.0
  132. ForeThemeColorIndex =2
  133. ForeShade =50.0
  134. GridlineThemeColorIndex =1
  135. GridlineShade =65.0
  136. End
  137. Begin FormHeader
  138. Height =510
  139. BackColor =15849926
  140. Name ="EntêteFormulaire"
  141. AlternateBackThemeColorIndex =1
  142. AlternateBackShade =95.0
  143. BackThemeColorIndex =2
  144. BackTint =20.0
  145. Begin
  146. Begin Label
  147. OverlapFlags =85
  148. Left =170
  149. Top =56
  150. Width =3986
  151. Height =334
  152. FontSize =13
  153. BorderColor =8355711
  154. Name ="Étiquette20"
  155. Caption ="Création d'un nouvel agent"
  156. GridlineColor =10921638
  157. LayoutCachedLeft =170
  158. LayoutCachedTop =56
  159. LayoutCachedWidth =4156
  160. LayoutCachedHeight =390
  161. ForeTint =100.0
  162. End
  163. End
  164. End
  165. Begin Section
  166. Height =8787
  167. BackColor =14270637
  168. Name ="Détail"
  169. AlternateBackColor =15921906
  170. AlternateBackThemeColorIndex =1
  171. AlternateBackShade =95.0
  172. Begin
  173. Begin TextBox
  174. OverlapFlags =85
  175. IMESentenceMode =3
  176. Left =917
  177. Top =1530
  178. Width =3066
  179. Height =315
  180. ColumnWidth =3225
  181. BorderColor =10921638
  182. ForeColor =4210752
  183. Name ="Nom"
  184. ControlSource ="Nom"
  185. GridlineColor =10921638
  186. LayoutCachedLeft =917
  187. LayoutCachedTop =1530
  188. LayoutCachedWidth =3983
  189. LayoutCachedHeight =1845
  190. Begin
  191. Begin Label
  192. OverlapFlags =85
  193. Left =175
  194. Top =1530
  195. Width =585
  196. Height =315
  197. BorderColor =8355711
  198. Name ="Étiquette1"
  199. Caption ="Nom:"
  200. GridlineColor =10921638
  201. LayoutCachedLeft =175
  202. LayoutCachedTop =1530
  203. LayoutCachedWidth =760
  204. LayoutCachedHeight =1845
  205. ForeTint =100.0
  206. End
  207. End
  208. End
  209. Begin TextBox
  210. OverlapFlags =85
  211. IMESentenceMode =3
  212. Left =2561
  213. Top =2040
  214. Width =1431
  215. Height =315
  216. TabIndex =1
  217. BorderColor =10921638
  218. ForeColor =4210752
  219. Name ="Grade"
  220. ControlSource ="Grade"
  221. GridlineColor =10921638
  222. LayoutCachedLeft =2561
  223. LayoutCachedTop =2040
  224. LayoutCachedWidth =3992
  225. LayoutCachedHeight =2355
  226. Begin
  227. Begin Label
  228. OverlapFlags =85
  229. Left =180
  230. Top =2040
  231. Width =890
  232. Height =315
  233. BorderColor =8355711
  234. Name ="Étiquette2"
  235. Caption ="Grade:"
  236. GridlineColor =10921638
  237. LayoutCachedLeft =180
  238. LayoutCachedTop =2040
  239. LayoutCachedWidth =1070
  240. LayoutCachedHeight =2355
  241. ForeTint =100.0
  242. End
  243. End
  244. End
  245. Begin TextBox
  246. OverlapFlags =85
  247. IMESentenceMode =3
  248. Left =2561
  249. Top =2437
  250. Width =1431
  251. Height =315
  252. TabIndex =2
  253. BorderColor =10921638
  254. ForeColor =4210752
  255. Name ="Catégorie"
  256. ControlSource ="Catégorie"
  257. GridlineColor =10921638
  258. LayoutCachedLeft =2561
  259. LayoutCachedTop =2437
  260. LayoutCachedWidth =3992
  261. LayoutCachedHeight =2752
  262. Begin
  263. Begin Label
  264. OverlapFlags =85
  265. Left =180
  266. Top =2437
  267. Width =1080
  268. Height =315
  269. BorderColor =8355711
  270. Name ="Étiquette3"
  271. Caption ="Catégorie:"
  272. GridlineColor =10921638
  273. LayoutCachedLeft =180
  274. LayoutCachedTop =2437
  275. LayoutCachedWidth =1260
  276. LayoutCachedHeight =2752
  277. ForeTint =100.0
  278. End
  279. End
  280. End
  281. Begin TextBox
  282. OverlapFlags =85
  283. IMESentenceMode =3
  284. Left =2561
  285. Top =2834
  286. Width =1431
  287. Height =315
  288. TabIndex =3
  289. BorderColor =10921638
  290. ForeColor =4210752
  291. Name ="RémunérationBase"
  292. ControlSource ="RémunérationBase"
  293. GridlineColor =10921638
  294. LayoutCachedLeft =2561
  295. LayoutCachedTop =2834
  296. LayoutCachedWidth =3992
  297. LayoutCachedHeight =3149
  298. Begin
  299. Begin Label
  300. OverlapFlags =85
  301. Left =180
  302. Top =2834
  303. Width =2310
  304. Height =315
  305. BorderColor =8355711
  306. Name ="Étiquette4"
  307. Caption ="Rémunération de base:"
  308. GridlineColor =10921638
  309. LayoutCachedLeft =180
  310. LayoutCachedTop =2834
  311. LayoutCachedWidth =2490
  312. LayoutCachedHeight =3149
  313. ForeTint =100.0
  314. End
  315. End
  316. End
  317. Begin TextBox
  318. OverlapFlags =85
  319. IMESentenceMode =3
  320. Left =2578
  321. Top =3231
  322. Width =1401
  323. Height =315
  324. TabIndex =4
  325. BorderColor =10921638
  326. ForeColor =4210752
  327. Name ="Groupe"
  328. ControlSource ="Groupe"
  329. GridlineColor =10921638
  330. LayoutCachedLeft =2578
  331. LayoutCachedTop =3231
  332. LayoutCachedWidth =3979
  333. LayoutCachedHeight =3546
  334. Begin
  335. Begin Label
  336. OverlapFlags =85
  337. Left =180
  338. Top =3231
  339. Width =795
  340. Height =315
  341. BorderColor =8355711
  342. Name ="Étiquette5"
  343. Caption ="Groupe"
  344. GridlineColor =10921638
  345. LayoutCachedLeft =180
  346. LayoutCachedTop =3231
  347. LayoutCachedWidth =975
  348. LayoutCachedHeight =3546
  349. ForeTint =100.0
  350. End
  351. End
  352. End
  353. Begin TextBox
  354. OverlapFlags =85
  355. IMESentenceMode =3
  356. Left =7606
  357. Top =1530
  358. Width =4191
  359. Height =750
  360. TabIndex =5
  361. BorderColor =10921638
  362. ForeColor =4210752
  363. Name ="ResidenceAdmin"
  364. ControlSource ="ResidenceAdmin"
  365. GridlineColor =10921638
  366. LayoutCachedLeft =7606
  367. LayoutCachedTop =1530
  368. LayoutCachedWidth =11797
  369. LayoutCachedHeight =2280
  370. Begin
  371. Begin Label
  372. OverlapFlags =85
  373. Left =5005
  374. Top =1530
  375. Width =2490
  376. Height =315
  377. BorderColor =8355711
  378. Name ="Étiquette6"
  379. Caption ="Résidence administrative:"
  380. GridlineColor =10921638
  381. LayoutCachedLeft =5005
  382. LayoutCachedTop =1530
  383. LayoutCachedWidth =7495
  384. LayoutCachedHeight =1845
  385. ForeTint =100.0
  386. End
  387. End
  388. End
  389. Begin TextBox
  390. OverlapFlags =85
  391. IMESentenceMode =3
  392. Left =7606
  393. Top =2380
  394. Width =4191
  395. Height =780
  396. TabIndex =6
  397. BorderColor =10921638
  398. ForeColor =4210752
  399. Name ="ResidenceFamiliale"
  400. ControlSource ="ResidenceFamiliale"
  401. GridlineColor =10921638
  402. LayoutCachedLeft =7606
  403. LayoutCachedTop =2380
  404. LayoutCachedWidth =11797
  405. LayoutCachedHeight =3160
  406. Begin
  407. Begin Label
  408. OverlapFlags =85
  409. Left =4998
  410. Top =2380
  411. Width =2040
  412. Height =315
  413. BorderColor =8355711
  414. Name ="Étiquette7"
  415. Caption ="Résidence familiale:"
  416. GridlineColor =10921638
  417. LayoutCachedLeft =4998
  418. LayoutCachedTop =2380
  419. LayoutCachedWidth =7038
  420. LayoutCachedHeight =2695
  421. ForeTint =100.0
  422. End
  423. End
  424. End
  425. Begin TextBox
  426. OverlapFlags =85
  427. IMESentenceMode =3
  428. Left =7606
  429. Top =3344
  430. Width =3411
  431. Height =315
  432. TabIndex =7
  433. BorderColor =10921638
  434. ForeColor =4210752
  435. Name ="Telephone"
  436. ControlSource ="Telephone"
  437. GridlineColor =10921638
  438. LayoutCachedLeft =7606
  439. LayoutCachedTop =3344
  440. LayoutCachedWidth =11017
  441. LayoutCachedHeight =3659
  442. Begin
  443. Begin Label
  444. OverlapFlags =85
  445. Left =5005
  446. Top =3340
  447. Width =1140
  448. Height =315
  449. BorderColor =8355711
  450. Name ="Étiquette9"
  451. Caption ="Téléphone:"
  452. GridlineColor =10921638
  453. LayoutCachedLeft =5005
  454. LayoutCachedTop =3340
  455. LayoutCachedWidth =6145
  456. LayoutCachedHeight =3655
  457. ForeTint =100.0
  458. End
  459. End
  460. End
  461. Begin TextBox
  462. OverlapFlags =85
  463. IMESentenceMode =3
  464. Left =2560
  465. Top =3627
  466. Width =1431
  467. Height =315
  468. TabIndex =8
  469. BorderColor =10921638
  470. ForeColor =4210752
  471. Name ="Matricule"
  472. ControlSource ="Matricule"
  473. GridlineColor =10921638
  474. LayoutCachedLeft =2560
  475. LayoutCachedTop =3627
  476. LayoutCachedWidth =3991
  477. LayoutCachedHeight =3942
  478. Begin
  479. Begin Label
  480. OverlapFlags =85
  481. Left =180
  482. Top =3628
  483. Width =960
  484. Height =315
  485. BorderColor =8355711
  486. Name ="Étiquette10"
  487. Caption ="Matricule"
  488. GridlineColor =10921638
  489. LayoutCachedLeft =180
  490. LayoutCachedTop =3628
  491. LayoutCachedWidth =1140
  492. LayoutCachedHeight =3943
  493. ForeTint =100.0
  494. End
  495. End
  496. End
  497. Begin TextBox
  498. OverlapFlags =85
  499. IMESentenceMode =3
  500. Left =3984
  501. Top =5102
  502. Width =1641
  503. Height =315
  504. TabIndex =9
  505. BorderColor =10921638
  506. ForeColor =4210752
  507. Name ="DateAutorisationVP"
  508. ControlSource ="DateAutorisationVP"
  509. StatusBarText ="Date de l'autorisation d'utiliser le véhicule personnel"
  510. GridlineColor =10921638
  511. LayoutCachedLeft =3984
  512. LayoutCachedTop =5102
  513. LayoutCachedWidth =5625
  514. LayoutCachedHeight =5417
  515. Begin
  516. Begin Label
  517. OverlapFlags =85
  518. Left =180
  519. Top =5101
  520. Width =3630
  521. Height =315
  522. BorderColor =8355711
  523. Name ="Étiquette12"
  524. Caption ="Date de l'autorisation de circuler:"
  525. GridlineColor =10921638
  526. LayoutCachedLeft =180
  527. LayoutCachedTop =5101
  528. LayoutCachedWidth =3810
  529. LayoutCachedHeight =5416
  530. ForeTint =100.0
  531. End
  532. End
  533. End
  534. Begin TextBox
  535. OverlapFlags =85
  536. IMESentenceMode =3
  537. Left =3978
  538. Top =5499
  539. Width =1641
  540. Height =315
  541. ColumnWidth =2640
  542. TabIndex =10
  543. BorderColor =10921638
  544. ForeColor =4210752
  545. Name ="PuissanceFiscVP"
  546. ControlSource ="PuissanceFiscVP"
  547. StatusBarText ="Puissance Fiscale Réelle du VP"
  548. GridlineColor =10921638
  549. LayoutCachedLeft =3978
  550. LayoutCachedTop =5499
  551. LayoutCachedWidth =5619
  552. LayoutCachedHeight =5814
  553. Begin
  554. Begin Label
  555. OverlapFlags =85
  556. Left =175
  557. Top =5500
  558. Width =2430
  559. Height =315
  560. BorderColor =8355711
  561. Name ="Étiquette13"
  562. Caption ="Puissance fiscale (en CV):"
  563. GridlineColor =10921638
  564. LayoutCachedLeft =175
  565. LayoutCachedTop =5500
  566. LayoutCachedWidth =2605
  567. LayoutCachedHeight =5815
  568. ForeTint =100.0
  569. End
  570. End
  571. End
  572. Begin TextBox
  573. OverlapFlags =85
  574. IMESentenceMode =3
  575. Left =3978
  576. Top =5895
  577. Width =1641
  578. Height =315
  579. TabIndex =11
  580. BorderColor =10921638
  581. ForeColor =4210752
  582. Name ="NbKmAutorisesVP"
  583. ControlSource ="NbKmAutorisesVP"
  584. StatusBarText ="Nombre de Km que l'agent est autorisé à parcourir avec son VP"
  585. GridlineColor =10921638
  586. LayoutCachedLeft =3978
  587. LayoutCachedTop =5895
  588. LayoutCachedWidth =5619
  589. LayoutCachedHeight =6210
  590. Begin
  591. Begin Label
  592. OverlapFlags =85
  593. Left =175
  594. Top =5890
  595. Width =2310
  596. Height =315
  597. BorderColor =8355711
  598. Name ="Étiquette14"
  599. Caption ="Nombr de Km autorisés:"
  600. GridlineColor =10921638
  601. LayoutCachedLeft =175
  602. LayoutCachedTop =5890
  603. LayoutCachedWidth =2485
  604. LayoutCachedHeight =6205
  605. ForeTint =100.0
  606. End
  607. End
  608. End
  609. Begin TextBox
  610. OverlapFlags =85
  611. IMESentenceMode =3
  612. Left =7606
  613. Top =3798
  614. Width =3411
  615. Height =315
  616. TabIndex =13
  617. BorderColor =10921638
  618. ForeColor =4210752
  619. Name ="TypeVirement"
  620. ControlSource ="TypeVirement"
  621. GridlineColor =10921638
  622. LayoutCachedLeft =7606
  623. LayoutCachedTop =3798
  624. LayoutCachedWidth =11017
  625. LayoutCachedHeight =4113
  626. Begin
  627. Begin Label
  628. OverlapFlags =85
  629. Left =5005
  630. Top =3805
  631. Width =1770
  632. Height =315
  633. BorderColor =8355711
  634. Name ="Étiquette15"
  635. Caption ="Type de virement:"
  636. GridlineColor =10921638
  637. LayoutCachedLeft =5005
  638. LayoutCachedTop =3805
  639. LayoutCachedWidth =6775
  640. LayoutCachedHeight =4120
  641. ForeTint =100.0
  642. End
  643. End
  644. End
  645. Begin ComboBox
  646. OverlapFlags =85
  647. IMESentenceMode =3
  648. ColumnCount =2
  649. Left =2334
  650. Top =4648
  651. Width =3288
  652. Height =315
  653. TabIndex =14
  654. BorderColor =10921638
  655. ForeColor =4138256
  656. ColumnInfo ="\"\";\"\";\"\";\"\";\"10\";\"510\""
  657. Name ="TypeVehicule"
  658. ControlSource ="TypeVehicule"
  659. RowSourceType ="Table/Query"
  660. RowSource ="SELECT tbl_Listes.CodeChoix, tbl_Listes.LibelleChoix, tbl_Listes.TableListe, tbl"
  661. "_Listes.ChampListe FROM tbl_Listes WHERE (((tbl_Listes.TableListe)='tbl_Agents')"
  662. " AND ((tbl_Listes.ChampListe)='TypeVehicule')); "
  663. ColumnWidths ="0;2835"
  664. GridlineColor =10921638
  665. LayoutCachedLeft =2334
  666. LayoutCachedTop =4648
  667. LayoutCachedWidth =5622
  668. LayoutCachedHeight =4963
  669. Begin
  670. Begin Label
  671. OverlapFlags =85
  672. Left =180
  673. Top =4648
  674. Width =1710
  675. Height =315
  676. BorderColor =8355711
  677. Name ="Étiquette22"
  678. Caption ="Type de véhicule:"
  679. GridlineColor =10921638
  680. LayoutCachedLeft =180
  681. LayoutCachedTop =4648
  682. LayoutCachedWidth =1890
  683. LayoutCachedHeight =4963
  684. ForeTint =100.0
  685. End
  686. End
  687. End
  688. Begin Label
  689. FontUnderline = NotDefault
  690. OverlapFlags =85
  691. Left =180
  692. Top =1133
  693. Width =789
  694. Height =340
  695. FontSize =12
  696. FontWeight =700
  697. BorderColor =8355711
  698. Name ="Étiquette23"
  699. Caption ="Poste:"
  700. GridlineColor =10921638
  701. LayoutCachedLeft =180
  702. LayoutCachedTop =1133
  703. LayoutCachedWidth =969
  704. LayoutCachedHeight =1473
  705. ForeTint =100.0
  706. End
  707. Begin Label
  708. FontUnderline = NotDefault
  709. OverlapFlags =85
  710. Left =5005
  711. Top =1135
  712. Width =1485
  713. Height =345
  714. FontSize =12
  715. FontWeight =700
  716. BorderColor =8355711
  717. Name ="Étiquette24"
  718. Caption ="Coordonnées:"
  719. GridlineColor =10921638
  720. LayoutCachedLeft =5005
  721. LayoutCachedTop =1135
  722. LayoutCachedWidth =6490
  723. LayoutCachedHeight =1480
  724. ForeTint =100.0
  725. End
  726. Begin TextBox
  727. OverlapFlags =85
  728. IMESentenceMode =3
  729. Left =4308
  730. Top =510
  731. Width =1819
  732. Height =300
  733. ColumnOrder =3
  734. FontWeight =700
  735. TabIndex =12
  736. BorderColor =10921638
  737. Name ="NvelleDate"
  738. Format ="Short Date"
  739. GridlineColor =10921638
  740. LayoutCachedLeft =4308
  741. LayoutCachedTop =510
  742. LayoutCachedWidth =6127
  743. LayoutCachedHeight =810
  744. ForeTint =100.0
  745. End
  746. Begin Label
  747. FontUnderline = NotDefault
  748. OverlapFlags =85
  749. Left =180
  750. Top =4195
  751. Width =2085
  752. Height =345
  753. FontSize =12
  754. FontWeight =700
  755. BorderColor =8355711
  756. Name ="Étiquette25"
  757. Caption ="Véhicule personnel:"
  758. GridlineColor =10921638
  759. LayoutCachedLeft =180
  760. LayoutCachedTop =4195
  761. LayoutCachedWidth =2265
  762. LayoutCachedHeight =4540
  763. ForeTint =100.0
  764. End
  765. Begin Label
  766. FontUnderline = NotDefault
  767. OverlapFlags =85
  768. Left =165
  769. Top =510
  770. Width =4035
  771. Height =345
  772. FontSize =12
  773. FontWeight =700
  774. BorderColor =8355711
  775. Name ="Étiquette47"
  776. Caption ="Ces données seront valides à partir du:"
  777. GridlineColor =10921638
  778. LayoutCachedLeft =165
  779. LayoutCachedTop =510
  780. LayoutCachedWidth =4200
  781. LayoutCachedHeight =855
  782. ForeTint =100.0
  783. End
  784. Begin TextBox
  785. OverlapFlags =85
  786. IMESentenceMode =3
  787. Left =2097
  788. Top =113
  789. Width =1086
  790. Height =315
  791. FontWeight =700
  792. TabIndex =15
  793. BorderColor =10921638
  794. Name ="CodeAgent"
  795. ControlSource ="CodeAgent"
  796. GridlineColor =10921638
  797. LayoutCachedLeft =2097
  798. LayoutCachedTop =113
  799. LayoutCachedWidth =3183
  800. LayoutCachedHeight =428
  801. ForeTint =100.0
  802. Begin
  803. Begin Label
  804. FontUnderline = NotDefault
  805. OverlapFlags =85
  806. Left =165
  807. Top =120
  808. Width =1815
  809. Height =315
  810. FontSize =12
  811. FontWeight =700
  812. BorderColor =8355711
  813. Name ="Étiquette0"
  814. Caption ="Code de l'agent:"
  815. GridlineColor =10921638
  816. LayoutCachedLeft =165
  817. LayoutCachedTop =120
  818. LayoutCachedWidth =1980
  819. LayoutCachedHeight =435
  820. ForeTint =100.0
  821. End
  822. End
  823. End
  824. Begin Label
  825. OverlapFlags =93
  826. Left =170
  827. Top =6836
  828. Width =7365
  829. Height =585
  830. BorderColor =8355711
  831. Name ="Étiquette50"
  832. Caption ="Si l'agent a déja parcouru des kilomètres avec son véhicule personnel lors de la"
  833. " création, veuillez en saisir la quantité ici:"
  834. GridlineColor =10921638
  835. LayoutCachedLeft =170
  836. LayoutCachedTop =6836
  837. LayoutCachedWidth =7535
  838. LayoutCachedHeight =7421
  839. ForeTint =100.0
  840. End
  841. Begin TextBox
  842. OverlapFlags =223
  843. IMESentenceMode =3
  844. Left =3973
  845. Top =7086
  846. Width =1294
  847. Height =315
  848. TabIndex =16
  849. BorderColor =10921638
  850. ForeColor =4210752
  851. Name ="KmSuppl"
  852. DefaultValue ="0"
  853. GridlineColor =10921638
  854. ShowDatePicker =0
  855. LayoutCachedLeft =3973
  856. LayoutCachedTop =7086
  857. LayoutCachedWidth =5267
  858. LayoutCachedHeight =7401
  859. End
  860. Begin Label
  861. FontUnderline = NotDefault
  862. OverlapFlags =85
  863. Left =170
  864. Top =6387
  865. Width =2250
  866. Height =345
  867. FontSize =12
  868. FontWeight =700
  869. BorderColor =8355711
  870. Name ="Étiquette52"
  871. Caption ="Kilomètres initiaux:"
  872. GridlineColor =10921638
  873. LayoutCachedLeft =170
  874. LayoutCachedTop =6387
  875. LayoutCachedWidth =2420
  876. LayoutCachedHeight =6732
  877. ForeTint =100.0
  878. End
  879. Begin TextBox
  880. OverlapFlags =85
  881. IMESentenceMode =3
  882. Left =231
  883. Top =7879
  884. Width =5222
  885. Height =585
  886. TabIndex =17
  887. BorderColor =10921638
  888. ForeColor =4210752
  889. Name ="MotifKmSuppl"
  890. GridlineColor =10921638
  891. LayoutCachedLeft =231
  892. LayoutCachedTop =7879
  893. LayoutCachedWidth =5453
  894. LayoutCachedHeight =8464
  895. Begin
  896. Begin Label
  897. OverlapFlags =85
  898. Left =175
  899. Top =7541
  900. Width =5490
  901. Height =315
  902. BorderColor =8355711
  903. Name ="Étiquette54"
  904. Caption ="(Optionnel)Raison d'être des kilomètres supplémentaires:"
  905. GridlineColor =10921638
  906. LayoutCachedLeft =175
  907. LayoutCachedTop =7541
  908. LayoutCachedWidth =5665
  909. LayoutCachedHeight =7856
  910. ForeTint =100.0
  911. End
  912. End
  913. End
  914. Begin Label
  915. OverlapFlags =215
  916. Left =5272
  917. Top =7086
  918. Width =510
  919. Height =284
  920. BorderColor =8355711
  921. Name ="Étiquette55"
  922. Caption ="Km"
  923. GridlineColor =10921638
  924. LayoutCachedLeft =5272
  925. LayoutCachedTop =7086
  926. LayoutCachedWidth =5782
  927. LayoutCachedHeight =7370
  928. ForeTint =100.0
  929. End
  930. End
  931. End
  932. Begin FormFooter
  933. Height =623
  934. BackColor =14270637
  935. Name ="PiedFormulaire"
  936. AlternateBackThemeColorIndex =1
  937. AlternateBackShade =95.0
  938. Begin
  939. Begin CommandButton
  940. OverlapFlags =85
  941. Left =7993
  942. Top =113
  943. Width =1647
  944. Height =403
  945. ForeColor =4210752
  946. Name ="CmdOK"
  947. Caption ="Créer"
  948. OnClick ="[Event Procedure]"
  949. GridlineColor =10921638
  950. LayoutCachedLeft =7993
  951. LayoutCachedTop =113
  952. LayoutCachedWidth =9640
  953. LayoutCachedHeight =516
  954. Gradient =0
  955. BackColor =15921906
  956. BackThemeColorIndex =1
  957. BackTint =100.0
  958. BackShade =95.0
  959. BorderColor =14136213
  960. HoverColor =15060409
  961. PressedColor =9592887
  962. HoverForeColor =4210752
  963. PressedForeColor =4210752
  964. WebImagePaddingLeft =2
  965. WebImagePaddingTop =2
  966. WebImagePaddingRight =1
  967. WebImagePaddingBottom =1
  968. End
  969. Begin CommandButton
  970. OverlapFlags =85
  971. Left =9977
  972. Top =113
  973. Width =1647
  974. Height =403
  975. TabIndex =1
  976. ForeColor =4210752
  977. Name ="Annuler"
  978. Caption ="Annuler"
  979. OnClick ="[Event Procedure]"
  980. GridlineColor =10921638
  981. LayoutCachedLeft =9977
  982. LayoutCachedTop =113
  983. LayoutCachedWidth =11624
  984. LayoutCachedHeight =516
  985. Gradient =0
  986. BackColor =15921906
  987. BackThemeColorIndex =1
  988. BackTint =100.0
  989. BackShade =95.0
  990. BorderColor =14136213
  991. HoverColor =15060409
  992. PressedColor =9592887
  993. HoverForeColor =4210752
  994. PressedForeColor =4210752
  995. WebImagePaddingLeft =2
  996. WebImagePaddingTop =2
  997. WebImagePaddingRight =1
  998. WebImagePaddingBottom =1
  999. End
  1000. End
  1001. End
  1002. End
  1003. End
  1004. CodeBehindForm
  1005. Attribute VB_GlobalNameSpace = False
  1006. Attribute VB_Creatable = True
  1007. Attribute VB_PredeclaredId = True
  1008. Attribute VB_Exposed = False
  1009. Option Compare Database
  1010. Private Sub Annuler_Click()
  1011. Dim avertissement As Integer
  1012. Dim sql, CodeAgent As String
  1013. If MsgBox("Attention, les données saisies seront perdues. Voulez-vous continuer?", vbYesNo) = vbNo Then Exit Sub
  1014. CodeAgent = Me.CodeAgent
  1015. If DCount("JourRH", "tbl_formDep", "[CodeAgent]='" & CodeAgent & "'") > 0 Or DCount("JourRH", "tbl_formHS", "[CodeAgent]='" & CodeAgent & "'") > 0 Then
  1016. MsgBox "Des données RH ont été importées pour cet agent, l'opération de suppression est annulée"
  1017. Exit Sub
  1018. End If
  1019. avertissement = Nz(parametre("AvertSQL"), 1)
  1020. If avertissement = 0 Then DoCmd.SetWarnings False
  1021. sql = "DELETE * FROM tbl_Agents WHERE [CodeAgent]='" & CodeAgent & "';"
  1022. DoCmd.RunSQL sql
  1023. sql = "DELETE * FROM tbl_PeriodeAgent WHERE [CodeAgent]='" & CodeAgent & "';"
  1024. DoCmd.RunSQL sql
  1025. sql = "DELETE * FROM tbl_KmSuppl WHERE [CodeAgent]='" & CodeAgent & "';"
  1026. DoCmd.RunSQL sql
  1027. DoCmd.SetWarnings True
  1028. DoCmd.Close
  1029. End Sub
  1030. Private Sub Form_Open(Cancel As Integer)
  1031. Dim rs As DAO.Recordset
  1032. Dim CodeAgent As String
  1033. 'l'ajout d'un nouvel agent implique l'ajout d'une ligne à la table agent, ainsi que d'une ligne à la table tbl_PeriodeAgent.
  1034. 'La création de cette ligne implique de connaitre la date à partir de laquelle ce nouvel agent est opérationnel
  1035. 'si cette date n'est pas en janvier, une ligne doit être ajoutée aux tables tbl_FormDep et tbl_FormHS qui servira de conditions initiales
  1036. Me.NvelleDate = "01/" & Format(Month(Now()), "00") & "/" & Year(Now())
  1037. CodeAgent = Nz(InputBox("Veuillez saisir le code de l'agent à ajouter:"), "")
  1038. If CodeAgent = "" Then
  1039. MsgBox "Opération Annulée"
  1040. DoCmd.Close
  1041. Exit Sub
  1042. End If
  1043. 'Création d'une nouvelle ligne dans tbl_Agents
  1044. Set rs = CurrentDb.OpenRecordset("tbl_Agents")
  1045. rs.AddNew
  1046. rs![CodeAgent] = CodeAgent
  1047. rs![PeriodeValidite] = 1
  1048. rs.Update
  1049. 'on place l'enregistrement du formulaire sur ce nouvel enregistrement
  1050. Me.FilterOn = False
  1051. Me.Filter = "[CodeAgent]='" & CodeAgent & "' AND [PeriodeValidite]=1"
  1052. Me.FilterOn = True
  1053. Me.Refresh
  1054. End Sub
  1055. Private Sub CmdOK_Click()
  1056. Dim rs As DAO.Recordset
  1057. Dim NvelleDate As Date
  1058. Dim CodeAgent As String
  1059. CodeAgent = Me.CodeAgent
  1060. NvelleDate = CDate(Me.NvelleDate)
  1061. If IsNull(NvelleDate) Then
  1062. Me.NvelleDate.BackColor = 12566463
  1063. Exit Sub
  1064. End If
  1065. NvPeriode = NvellePeriode("tbl_PeriodeAgent", CodeAgent, NvelleDate)
  1066. If NvPeriode = 0 Then
  1067. MsgBox "Erreur lors de la création de la nouvelle période de validité."
  1068. Exit Sub
  1069. End If
  1070. If Nz(Me.KmSuppl, 0) <> 0 Then
  1071. Set rs = CurrentDb.OpenRecordset("tbl_KmSuppl")
  1072. rs.AddNew
  1073. rs![CodeAgent] = CodeAgent
  1074. rs![anneeRH] = Year(NvelleDate)
  1075. rs![KmSuppl] = Me.KmSuppl
  1076. rs![Motif] = Nz(Me.MotifKmSuppl, "")
  1077. rs.Update
  1078. End If
  1079. Call CreerMsg(13, , CodeAgent)
  1080. MsgBox "L'agent " & CodeAgent & " a été créé."
  1081. DoCmd.Close
  1082. End Sub