S
swlaw
I am trying to create a multi-user login. When I create this in a 'sample'
database it works fine. I create three forms and one login form with the
appropriate VB code. No problems, I can add as many users as I want in the
code.
The problem is when I try to create the exact same login, same code, in my
actual database, for some reason it does not work. I checked all the names
and so on but cannot seem to get it to work.
Any suggestions for something I may be doing wrong.
Please help.
This a portion of the code:
Private Sub Login_Current()
Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Access Granted", vbInformation, "JMS"
MsgBox "Welcome", vbInformation, "JMS"
DoCmd.Close
DoCmd.OpenForm "Switchboard"
Else
MsgBox "Please re-enter your Username and Password."
End If
End Sub
database it works fine. I create three forms and one login form with the
appropriate VB code. No problems, I can add as many users as I want in the
code.
The problem is when I try to create the exact same login, same code, in my
actual database, for some reason it does not work. I checked all the names
and so on but cannot seem to get it to work.
Any suggestions for something I may be doing wrong.
Please help.
This a portion of the code:
Private Sub Login_Current()
Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Access Granted", vbInformation, "JMS"
MsgBox "Welcome", vbInformation, "JMS"
DoCmd.Close
DoCmd.OpenForm "Switchboard"
Else
MsgBox "Please re-enter your Username and Password."
End If
End Sub