Open form for current user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to open a form with a control only when a specific user is logged onto
the database. it must be possible but can't find a way - its driving me mad.

Any suggestions much appreciated

Pete
 
If you are using Access user-level security, the CurrentUser() function will
give you the name of that user:

If CurrentUser() = "Arvin" Then
DoCmd.OpenForm "frmWhatever"
End If

The same type of code will work if you capture the Windows username:

http://www.mvps.org/access/api/api0008.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top