[SOLVED] Coding Error. Login Forms. Help?
I've created a login form that with all the code, it should work perfectly. I've double checked the names of all items mentioned in the coding, and it should appear fine.
However, when I try to log in, it presents an error code:
This is a copy of my code:
The line that is in blue, bolded and underlined is the line of coding that Access is stating isn't working properly, however I see no issues with the code, and after googling various solutions, attempting them, nothing seems to solve it. As a result, I rely on this forum yet again.
I'm using microsoft access 2013 Profesional Plus.
I've created a login form that with all the code, it should work perfectly. I've double checked the names of all items mentioned in the coding, and it should appear fine.
However, when I try to log in, it presents an error code:
Run-time error '424':
Object required
This is a copy of my code:
Code:
Private Sub Command1_Click()
Username.SetFocus
[B][U][COLOR="Blue"]If [Username] = Table.[tbl_User].[UserLogin] And [Password] = Table.[tbl_User].[Password] Then[/COLOR][/U][/B]
MsgBox "Successful Login", vbInformation, "Central Bedfordshire Libraries Training and Induction"
DoCmd.Close
DoCmd.OpenForm "Frm_Main"
Else
MsgBox "Invalid Username/Password combination, please try again."
Me.Username.SetFocus
End If
End Sub
The line that is in blue, bolded and underlined is the line of coding that Access is stating isn't working properly, however I see no issues with the code, and after googling various solutions, attempting them, nothing seems to solve it. As a result, I rely on this forum yet again.
I'm using microsoft access 2013 Profesional Plus.
Last edited: