Hey guys, back at it again. I need some help with syntax once more. Got the code below and want to include the Computername listed in the tbl for the record that matches the Currentuser() in the MsgBox after the "you are currently Logged-in " text. Any ideas or is there another way of doing this?
Thank you guys for the help.
Form_Load()
DCount("*", "tblCurrentlyLoggedIn", "empCurrentlyLoggedIn=" & Chr(34) & CurrentUser() & Chr(34)) > 0 And DCount("*", "tblCurrentlyLoggedIn", "empEnviron<>" & Chr(34) & Environ("computername") & Chr(34)) > 0 Then
MsgBox CurrentUser() & _
vbCrLf & " " & _
vbCrLf & " you are currently logged-in " & _
vbCrLf & " " & _
vbCrLf & "Please log-off from the other computer before you continue.", vbExclamation, "Stop, you are logged-in elsewhere."
DoCmd.Quit acQuitSaveAll