I have a simple multiuser login script seen below that works alright -
Code:
Private Sub Validate_Click()
Username.SetFocus
If Username = "Tom W" And Password = "tw123!" Then
MsgBox "Access Granted - Welcome Tom", vbInformation, "Welcome"
DoCmd.Close
DoCmd.OpenForm "frm_Main_Menu"
ElseIf Username = "Rich C" And Password = "rc123!" Then
MsgBox "Access Granted - Welcome Rich", vbInformation, "Welcome"
DoCmd.Close
DoCmd.OpenForm "frm_Main_Menu"
ElseIf Username = "Alex J" And Password = "Gal.2:20" Then
MsgBox "Access Granted - Welcome Alex", vbInformation, "Welcome"
DoCmd.Close
DoCmd.OpenForm "frm_Main_Menu"
ElseIf Username = "manager1" And Password = "manager1" Then
MsgBox "Please Exercise Caution When Altering Back End", vbInformation, "Manager Area"
DoCmd.Close
DoCmd.OpenForm "frm_Main_Menu"
Else
MsgBox "Login Error - Please re-enter your information", vbInformation, "Login Error"
End If
End Sub
but what I want is to have the username go in a field in the table whenever a user makes a change to a record in that table. Can I do this with this script? How would I do this? Thanks