D. BOUTON RECHERCHER
Private Sub CMDRECHERCHER_Click()
Set MBULU= DBEngine.Workspaces(0).Databases(0)
Set GABRIEL = MBULU.OpenRecordset("Tclient", DB_OPEN_TABLE)
B.Index = "numcl"
B.Seek "=", NUMCL
If B.NoMatch Then
MsgBox "Enregistrement inexistant", vbInformation
NUMAS.SetFocus
Else
NUMCL = B.Fields("numcl")
CODNAT = B.Fields("codnat")
NOMCL = B.Fields("nomcl")
typcl = B.Fields("typcl")
PSTCL = B.Fields("pstcl")
typcl = B.Fields("typcl")
ADRCL = B.Fields("adrcl")
SEXCL = B.Fields("sexcl")
TELCL = B.Fields("telcl")
End If
End Sub
E. BOUTON SUPPRIMER
Private Sub CMDSUPPRIMER_Click()
Set MBULU = DBEngine.Workspaces(0).Databases(0)
Set GABRIEL = MBULU.OpenRecordset("Tclient", DB_OPEN_TABLE)
B.Index = "numcl"
B.Seek "=", NUMCL
Dim D As String
D = MsgBox("voulez-vous supprimer?", vbQuestion + vbYesNo,
"confirmation")
If D = vbYes Then
B.Delete
NUMCL = ""
CODNAT = ""
NOMCL = ""
typcl = ""
PSTCL = ""
ADRCL = ""
SEXCL = ""
TELCL = ""
NUMCL.SetFocus
MsgBox "Suppression avec succès", vbInformation
ElseIf D = vbNo Then
NUMCL.SetFocus
End If
End Sub
F.BOUTON QUITTER
Private Sub CMDQUITTER_Click()
DoCmd.Close
End Sub
Private Sub Commande11_Click()
DoCmd.OpenForm "FCLIENT"
End Sub
2. INTERFACE ENREGISTRER
A.BOUTON ENREGISTRER
Private Sub Cmdenregistrer_Click()
Set mbulu = DBEngine.Workspaces(0).Databases(0)
Set gabriel = mbulu.OpenRecordset("Acheter", DB_OPEN_TABLE)
Dim s As String
s = MsgBox("Voulez-vous enregistrer ?", vbQuestion + vbYesNo,
"Confirmation")
If s = vbYes Then
cpa.AddNew
cpa.Fields("coddoc") = coddoc
cpa.Fields("matrag") = matrag
cpa.Fields("datenr") = datenr
cpa.Update
coddoc = ""
matrag = ""
datenr = ""
MsgBox "Enregistrement avec succès", vbExclamation, "G3
INFO JOUR"
coddoc.SetFocus
ElseIf s = vbNo Then
coddoc.SetFocus
End If
End Sub
B.bouton effacer
Private Sub CmdEffacer_Click()
coddoc = ""
matrag = ""
datenr = ""
coddoc.SetFocus
End Sub
C.BOUTON QUITTER
Private Sub CmdQuitter_Click()
DoCmd.Close
End Sub
D.CODES SOURCES CONSULTATION
Private Sub Commande47_Click()
DoCmd.OpenForm "consultationclient"
End Sub
E.CODES SOURCES DE L'INTERFACE CONNEXION
Private Sub CMDCONNEXION_Click()
If NU = UCase("PACIFICTRADING") And MP = "2013" Then
MsgBox "BIENVENUE DANS L'APPLICATION", vbOKOnly
DoCmd.Close
DoCmd.OpenForm "menu principal"
MsgBox "PACIFICTRADING"
Else
NU = ""
MP = ""
NU.SetFocus
End If
End Sub
F. QUITTER
Private Sub CMDDECONNEXION_Click()
DoCmd.Close
End Sub
G.CODES SOURCES DE L'APPEL DE L'ETAT SORTIE LISTE
DES CLIENTS PREFINANCES
Private Sub Option56_Click()
DoCmd.OpenReport "LISTE DE CL PREFN", acViewNormal
End Sub
Private Sub Commande44_Click()
DoCmd.OpenReport "liste de cl prefn", acViewReport
End Sub
|