wrightyrx7
Registered User.
- Local time
- Today, 14:10
- Joined
- Sep 4, 2014
- Messages
- 104
Hi All,
I have a simple Login Form and the following code, for a user to login (obviously if they get the username and password correct).
My database is to log calls, and part of the form that is completed is who took the call.
The person who took the call is the person logged in, how can I get access to remember who is logged in ready for when a new call is taken?
I have a simple Login Form and the following code, for a user to login (obviously if they get the username and password correct).
My database is to log calls, and part of the form that is completed is who took the call.
The person who took the call is the person logged in, how can I get access to remember who is logged in ready for when a new call is taken?
Code:
Private Sub Command1_Click()
If IsNull(Me.txtLoginID) Then
MsgBox "Please enter a Login ID", vbInformation, "Login ID Required"
Me.txtLoginID.SetFocus
ElseIf IsNull(Me.txtPassword) Then
MsgBox "Please enter a Password", vbInformation, "Password Required"
Me.txtPassword.SetFocus
Else
If (IsNull(DLookup("[Login ID]", "[Users Extended]", "[Login ID]='" & Me.txtLoginID.Value & "' and Password='" & Me.txtPassword.Value & "'"))) Then
MsgBox "Incorrect Login ID or Password."
Else
DoCmd.OpenForm "Call Details"
DoCmd.Close acForm, "Login", acSaveNo
End If
End If
End Sub