show all

L

Lez

Hi Guys,

I have a form that is filtered via the qrywindow with the criteria
'GetUsrUserID()' for the userID

However I now need to allow any administrator level controllers to view all
records, I have a usrLevelID but not sure how I would apply it to allow all
records to show for administrator level user?

Can anyone suggest anything alternative?

Thanks
 
A

Arvin Meyer [MVP]

The way I do it is to change the RecordSource of the form based upon the
user. I have a field in the underlying table for the security level. When
the menu form opens, it gets the name of the user and his security level
from a table. Then the query which returns the records has a column which
uses the following criteria:

Like
IIf(Val([Forms]![frmMENU]![txtLevel])>=40,"*",Val([Forms]![frmMENU]![txtLevel]))

So now, anyone with a security level above 40 sees every thing, and anyone
below 40 only sees the records with their level. That gives me about 20
choices since security levels up to 20 can see other things, in the
database, but none of the Job records.
 

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