Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the windows logon ID to determine form to start

Status
Not open for further replies.

dkape

MIS
Mar 22, 2001
17
0
0
US
I've been using the information in FAQ 181-93, titles "How do I get and use the Windows Login ID? "

I've gotten to the point where my database properly identifies users in the tblValidUsers table.

Now I want have different forms start based on the persons login id. I've appended the following code the validate user function.

--------------------
If strUserName = dkape Then
DoCmd.OpenForm "RCC_MAIN", acNormal
ElseIf strUserName = quali Then
DoCmd.OpenForm "FRM_SPEC_MAINT", acNormal
End If
---------------------

This code allows opens the form RCC_MAIN, even if logged in as user quali. I would be very greatful to anyone who can help me figure this out.
 
The problem could simply be that you don't have quotes around "quali". If you're not using an Option Explicit statement Access might think quali is a variable. hope this helps
 
dkape,

Where do you have this code executing? I have done something similar to this. I put the code in a module that I have set up to run when the database first opens.

HTH
Binky ::)
><>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top