Hi,
Can any one help me correcting modify script as when it is getting triggered i am getting error for Combo box (", UserSecurity='" & Me.CmbSecurity & "'" & _) ERROR is : Method or data member not found
Vba code given below
'When we clik on button Add there are two options.
'1. for insert
'2. for Update
If Me.TxtUserName & "" * "" Then
'This is for insert new
'Add Records
CurrentDb.Execute "INSERT INTO tbluser(UserName,UserLogin,Password,UserSecurity) VALUES ('" & Me.TxtUserName & "','" & TxtLogin & "','" & txtPassword & "','" & Me.CmbSecurity & "')"
MsgBox "New User Created", vbInformation, "New User Added!"
Else
'Otherwise Modify
CurrentDb.Execute "Update tbluser" & _
" SET UserName='" & Me.TxtUserName & "'" & _
", UserLogin='" & TxtLogin & "'" & _
", Password='" & txtPassword & "'" & _
", UserSecurity='" & Me.CmbSecurity & "'" & _
" WHERE UserName=" & Me.TxtUser.Tag
Can any one help me correcting modify script as when it is getting triggered i am getting error for Combo box (", UserSecurity='" & Me.CmbSecurity & "'" & _) ERROR is : Method or data member not found
Vba code given below
'When we clik on button Add there are two options.
'1. for insert
'2. for Update
If Me.TxtUserName & "" * "" Then
'This is for insert new
'Add Records
CurrentDb.Execute "INSERT INTO tbluser(UserName,UserLogin,Password,UserSecurity) VALUES ('" & Me.TxtUserName & "','" & TxtLogin & "','" & txtPassword & "','" & Me.CmbSecurity & "')"
MsgBox "New User Created", vbInformation, "New User Added!"
Else
'Otherwise Modify
CurrentDb.Execute "Update tbluser" & _
" SET UserName='" & Me.TxtUserName & "'" & _
", UserLogin='" & TxtLogin & "'" & _
", Password='" & txtPassword & "'" & _
", UserSecurity='" & Me.CmbSecurity & "'" & _
" WHERE UserName=" & Me.TxtUser.Tag