Hi,
I have created a basic login form (below) with the person needing to enter a username and password
So when the user enters the correct username and password, i need to know what i can do to make a [parameter] in one of the querys' to use the username that was entered
Private Sub Command6_Click()
username.SetFocus
If username = "user1" And password = "user1" Then
DoCmd.Close
DoCmd.OpenForm "test"
ElseIf username = "user2" And password = "user2" Then
DoCmd.Close
DoCmd.OpenForm "test2"
Else
MsgBox "wrong password"
End If
End Sub
I have created a basic login form (below) with the person needing to enter a username and password
So when the user enters the correct username and password, i need to know what i can do to make a [parameter] in one of the querys' to use the username that was entered
Private Sub Command6_Click()
username.SetFocus
If username = "user1" And password = "user1" Then
DoCmd.Close
DoCmd.OpenForm "test"
ElseIf username = "user2" And password = "user2" Then
DoCmd.Close
DoCmd.OpenForm "test2"
Else
MsgBox "wrong password"
End If
End Sub