voici UNE PARTIE de ligne de code, pour seulement un agenda telephonique:
...
Private Sub nomtext_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
variable = nomtext.Text
requête5 = "select * from personnel where nom like" & "'" & variable & "'"
personnel.CommandType = adCmdText
personnel.RecordSource = requête5
personnel.Refresh
End If
End Sub
Private Sub parnom_Click(Index As Integer)
MaRequête = "SELECT * FROM personnel ORDER BY nom"
personnel.CommandType = adCmdText
personnel.RecordSource = MaRequête
personnel.Refresh
End Sub
Private Sub parservice_Click(Index As Integer)
MaRequête1 = "SELECT * FROM personnel ORDER BY service"
personnel.CommandType = adCmdText
personnel.RecordSource = MaRequête1
personnel.Refresh
End Sub
Private Sub partelephone_Click(Index As Integer)
MaRequête2 = "SELECT * FROM personnel ORDER BY téléphone"
personnel.CommandType = adCmdText
personnel.RecordSource = MaRequête2
personnel.Refresh
End Sub
Private Sub servicetext_Click(Area As Integer)
variable4 = servicetext.Text
requete4 = "select * from personnel where service like" & "'" & variable4 & "'"
personnel.CommandType = adCmdText
personnel.RecordSource = requete4
personnel.Refresh
End Sub
Form 3 (mot de passe.frm) :
Private Sub pw_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
pw1 = "": pw = "": Exit Sub
End If
If KeyAscii <> 13 Then
pw1 = pw1 + Chr$(KeyAscii): KeyAscii = 42: Exit Sub
End If
...
uh_uh 