Load Form Based on Current User's Group

S

Sprinks

I have a Timesheet application for which I will be using Security for the
first time. Most users will have read/edit permissions for a single form, by
which they enter their time spent on various projects. I would like to load
an Administration Menu form on startup for those in the Admins group, and the
Timesheet form for the Users.

Prior to securing the database, I've set the Adminstration Menu as the form
to load on startup, and used a DLookup call in the Form_Open event to
determine the value of a stored "FullAdminRights" field for the current user.
If the user doesn't have the rights, the form closes and the Timesheet form
opens.

I'd rather let Security handle this, but if I remove User permissions for
the Administration Menu form, will the Form_Open event procedure even run?
If not, how can I load the Timesheet form?

Thanks for all help.
Sprinks
 
S

Sprinks

Thanks, Lynn.

How could I have this code execute on opening the database? I thought of
putting it in another form, set as the default to open, but I'd think there'd
be a cleaner way.

Thank you.
Sprinks
 
D

DJ Roberts

May be a better way, but sometimes I set my database to load up to a form
dedicated to routing users to the proper form. It has a script similar to
the one Lynn posted set to the Open event, and closes as soon as that script
runs.
 

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