stephaniechongg
Registered User.
- Local time
- Today, 22:56
- Joined
- Feb 5, 2016
- Messages
- 15
Upon running the code, i am unable proceed if I fill in invalid information in both the staffid and staffpassword table
The highlighted is the coding that the system keeps highlighting
I have a database submission due in 8 hours help
The highlighted is the coding that the system keeps highlighting
Code:
Private Sub Command1_Click()
Dim TempPass As String
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
TempPass = txtloginid.Value
[COLOR="Red"] TempPass = DLookup("StaffPassword", "Staff_chelsea", "StaffId = '" & Me.txtloginid.Value & "'")[/COLOR]
If (TempPass = txtpassword.Value) Then
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Welcome to MINIMALIST"
Style = vbOKOnly
Title = "Welcome"
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbOK Then
MyString = "ok"
DoCmd.OpenForm "1_StartNavigationMenu_Steph", acNormal
DoCmd.Close acForm, "1_Login_Chelsea", acSaveYes
Else
MsgBox "Wrong Password/StaffID"
End If
End If
End If
End Sub
I have a database submission due in 8 hours help