M
Martin
Hello,
I have tried to write a DLookup but it doesnt work. What I want to do is
find the username in a table of active users. If the username is not in the
list then i want to close the database. Here is the code:
If Username = DLookup("[Names]", "tblUsersList") Then
DoCmd.OpenForm "Server - HO", acNormal, "", "", , acNormal
Else
DoCmd.Quit
End If
The table is called "tblUserslist" and the only field in that table is
called "Names".
Can anyone help? I have tried several variations of this code but just cant
seem to get it to work.
Many thanks in advance.
Martin
I have tried to write a DLookup but it doesnt work. What I want to do is
find the username in a table of active users. If the username is not in the
list then i want to close the database. Here is the code:
If Username = DLookup("[Names]", "tblUsersList") Then
DoCmd.OpenForm "Server - HO", acNormal, "", "", , acNormal
Else
DoCmd.Quit
End If
The table is called "tblUserslist" and the only field in that table is
called "Names".
Can anyone help? I have tried several variations of this code but just cant
seem to get it to work.
Many thanks in advance.
Martin