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
| Private Sub cmdsave_Click()
Dim name As String
Dim sname As String
Dim login As String
Dim password As String
Dim fonction As String
name = txtName.Text
sname = txtSurname.Text
login = txtLogin.Text
password = txtPassword.Text
fonction = txtFonction.Text
If ((txtName = "") Or (sname = "") Or (login = "") Or (password = "") Or (fonction = "")) Then
MsgBox "There is a textbox empty", vbCritical, "error"
Else
db.Execute "insert into user_table(name_user,surname_user, login, password, fonction_user) values('" & name & "','" & sname & "','" & login & "','" & password & "','" & fonction & "')"
MsgBox "Successfully added", vbInformation, "Information"
mat = ""
sname = ""
sexe = ""
adress = ""
name = ""
fax = ""
fonct = ""
tel = ""
End If
End Sub |
Partager