Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Compare Database
- Private Sub Command1_Click()
- If IsNull(Me.txtLoginID) Then
- MsgBox "Please enter LoginID", vbInformation, "LoginID required"
- Me.txtLoginID.SetFocus
- ElseIf IsNull(Me.txtPassword) Then
- MsgBox "Please enter password", vbInformation, "Password Required"
- Me.txtPassword.SetFocus
- Else
- 'process the job
- If (IsNull(DLookup("UserName", "Users", "UserName ='" & Me.txtLoginID.Value & "'"))) Or _
- (IsNull(DLookup("Password", "Users", "Password ='" & Me.txtPassword.Value & "'"))) Then
- MsgBox "Incorrect LoginID or Password"
- Else
- MsgBox "Login and Password correct"
- DoCmd.OpenForm "mainmenu"
- End If
- End If
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement