Code vb
sana SBHA
Messages postés
1
Date d'inscription
Statut
Membre
Dernière intervention
-
korabiqua Messages postés 5 Statut Membre -
korabiqua Messages postés 5 Statut Membre -
je sais pas kel est ma faute ??? SVP aidez moi et mercii d'avance
Private Sub Command1_Click(Index As Integer)
Me.Hide
End Sub
Private Sub Command2_Click()
Dim req1, reponce, reponce1, req, str As String
Dim ENTIER As Integer
reponce = ""
reponce1 = ""
ENTIER = Val(text1.Text)
If ENTIER = 0 Then
MsgBox "Matricule est de type entier"
text1.Text = ""
Else
If text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Then
MsgBox "Remplir les cases vides"
Else
req1 = "select Matricule from utilisateur where Matricule= '" & text1.Text & "' "
With Record
.ActiveConnection = Conn
.Source = req1
.Open
End With
While Not Record.EOF
' List1Douilles.AddItem CADRecord(1).Value & " / " & CADRecord(2).Value
reponce = Record(0).Value
Record.MoveNext
Wend
Record.Close
req1 = "select Login from utilisateur where Login= '" & Text4.Text & "' "
With Record
.ActiveConnection = Conn
.Source = req1
.Open
End With
While Not Record.EOF
' List1Douilles.AddItem CADRecord(1).Value & " / " & CADRecord(2).Value
reponce1 = Record(0).Value
Record.MoveNext
Wend
Record.Close
If reponce = "" And reponce1 = "" Then
req = "insert into utilisateur(Matricule,Nom,Prenom,Login,Motpass,Profil) values ('" & text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "' ,'" & Text5.Text & "','" & Combo1.Text & "')"
With Record
.ActiveConnection = Conn
.Source = req
.Open
End With
Ajouterutilisateur.Visible = False
a = MsgBox(" Utilisateur ajouter avec succée!!", vbOKCancel, "Confirmation")
If (a = vbOK) Then
Menu_Principale.Visible = True
Else: Ajouterutilisateur.Show
End If
Else
MsgBox "Utilisateur existe"
End If
text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End If
End If
End Sub
End Sub
Private Sub Command1_Click(Index As Integer)
Me.Hide
End Sub
Private Sub Command2_Click()
Dim req1, reponce, reponce1, req, str As String
Dim ENTIER As Integer
reponce = ""
reponce1 = ""
ENTIER = Val(text1.Text)
If ENTIER = 0 Then
MsgBox "Matricule est de type entier"
text1.Text = ""
Else
If text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Then
MsgBox "Remplir les cases vides"
Else
req1 = "select Matricule from utilisateur where Matricule= '" & text1.Text & "' "
With Record
.ActiveConnection = Conn
.Source = req1
.Open
End With
While Not Record.EOF
' List1Douilles.AddItem CADRecord(1).Value & " / " & CADRecord(2).Value
reponce = Record(0).Value
Record.MoveNext
Wend
Record.Close
req1 = "select Login from utilisateur where Login= '" & Text4.Text & "' "
With Record
.ActiveConnection = Conn
.Source = req1
.Open
End With
While Not Record.EOF
' List1Douilles.AddItem CADRecord(1).Value & " / " & CADRecord(2).Value
reponce1 = Record(0).Value
Record.MoveNext
Wend
Record.Close
If reponce = "" And reponce1 = "" Then
req = "insert into utilisateur(Matricule,Nom,Prenom,Login,Motpass,Profil) values ('" & text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "' ,'" & Text5.Text & "','" & Combo1.Text & "')"
With Record
.ActiveConnection = Conn
.Source = req
.Open
End With
Ajouterutilisateur.Visible = False
a = MsgBox(" Utilisateur ajouter avec succée!!", vbOKCancel, "Confirmation")
If (a = vbOK) Then
Menu_Principale.Visible = True
Else: Ajouterutilisateur.Show
End If
Else
MsgBox "Utilisateur existe"
End If
text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End If
End If
End Sub
End Sub
A voir également:
- Code vb
- Code ascii - Guide
- Code puk bloqué - Guide
- Comment déverrouiller un téléphone quand on a oublié le code - Guide
- Code activation windows 10 - Guide
- Scanner qr code pc - Guide