Open form based on user name

P

Perry Kew

I have a fucntion that gets the username of the seven
people logged into our network. These seven users are
divided into three groups and I would like to open the
appropriate form when they open the Access database.

The function that I got is by Dev Ashish and I got it from
this site:
http://www.mvps.org/access/api/api0008.htm

If the initials are JNP or SRT I would like to open
frmOfficeInfo; if the initials are KMW or RCF I would like
to open frmBooks.

I am using Access 2002 and I security has not been
implemented. Moreover, creating shortcuts would be an
inconvenience as the forms may change frequently and I am
trying to avoid going to their desks too frequently. This
is a stand alone database on a network drive.

Hoping someone can help...

Thank you.
 
D

Dan Artuso

Hi,
Look up Autoexec in Help.
Basically you create a macro and call it Autoexec.
Access will run it on startup. Call a function that grabs your
users' logon name and then open the appropriate form.
 

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

Top