1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub IDEtat_Change()
Dim cnc As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim intVal As Integer
Dim varNval As Variant
Dim rst As New ADODB.Recordset
Dim varresult As Variant
Set cnc = CurrentProject.Connection
If Me.IDEtat = 5 Then
rst.open "Select Matricule,IDFormation,ValidationFormation From T_FormationPersonnel Where Matricule=" & Me.Matricule " And IDFormation=" & Me.IDFormation, cnc, adOpenStatic 'encadrer de ' cotes si strings !
varresult = rst!Matricule & rst!IDFormation & rst!ValidationFormation
MsgBox varresult
End If
End Sub |