Pls pls help anyone this is killing me:-
I have created a login form using the code below:-
Private Sub Command5_Click()
Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Access Granted"
DoCmd.Close
DoCmd.OpenForm "Crystal Compliance Database"
Else
MsgBox "Please Enter Correct Username or Password"
End If
End Sub
so the login form will only ever open the form "Crystal Compliance Database". The problem is that I have a feild in the form called "service centre / satellite" this lists the location of a depo i.e a depo could be in Basingstoke. Is there anyway that when the user logs in this will open the form "crystal compliance database" and shows data on the form for depo basingstoke.
help much appreciated
I have created a login form using the code below:-
Private Sub Command5_Click()
Username.SetFocus
If Username = "user1" And Password = "user1" Then
MsgBox "Access Granted"
DoCmd.Close
DoCmd.OpenForm "Crystal Compliance Database"
Else
MsgBox "Please Enter Correct Username or Password"
End If
End Sub
so the login form will only ever open the form "Crystal Compliance Database". The problem is that I have a feild in the form called "service centre / satellite" this lists the location of a depo i.e a depo could be in Basingstoke. Is there anyway that when the user logs in this will open the form "crystal compliance database" and shows data on the form for depo basingstoke.
help much appreciated