1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| ' Evènements lors de la sélection d'une fiche de poste dans la liste
Private Sub lst_Fiches_poste_AfterUpdate()
Dim db As DAO.Database
Dim rst_Fiche As DAO.Recordset
Dim str_Fiche As String
' Sélection des modules, des compétences et des infos concernant leur acquisition par l'opérateur
str_Fiche = "REQUETE SQL"
' Ouverture de la base
Set db = Application.CurrentDb
' Ouverture du Recordset
Set rst_Fiche = db.OpenRecordset(str_Fiche)
While Not rst_Fiche.EOF
Me.sf_Elements_FP_Op.Form.txt_Code = rst_Fiche("CODE")
Me.sf_Elements_FP_Op.Form.txt_Libelle = rst_Fiche("LIBELLE")
Me.sf_Elements_FP_Op.Form.txt_Formateur = rst_Fiche("FORMATEUR")
Me.sf_Elements_FP_Op.Form.txt_Date_acq = rst_Fiche("DATE_ACQ")
Me.sf_Elements_FP_Op.Form.txt_Observations = rst_Fiche("OBSERVATIONS")
If rst_Fiche("DATE_ACQ") <> Null Then
Me.sf_Elements_FP_Op.Form.btn_Valider.Visible = False
Else
Me.sf_Elements_FP_Op.Form.btn_Valider.Visible = True
End If
rst_Fiche.MoveNext
Wend
' Fermeture et libération des objets
rst_Fiche.Close
Set rst_Fiche = Nothing
Set db = Nothing
End Sub |
Partager