If you are not up to the potentially strenuous exercise of implementing MS
Access security (make backups before you even start!), a simpler solution
would be to create a list of "authorized" logon IDs (this could be a
Constant you create in a module), then check to see if the logonID of the
current user is in the list.
As an example:
Me!cmdReports.Enabled = (InStr([YourList], GetUserName())>0)
Regards
Jeff Boyce
Microsoft Office/Access MVP
>I have a module in my database that identifies the user (a function that
> records their NT user ID when they log in). Is there a way I can
[quoted text clipped - 9 lines]
>
> Thanks in advance for any help~!
J. Keggerlord - 13 Jul 2007 20:34 GMT
Okay, I am liking this train of thought!
How about if I have an existing table with NTUSER as one of the fields and
their PERMISSIONLEVEL as another field (with values like "edit" and "read").
When people access the database, would it be possible to run a compare
between the value coming from my module's (modGETNTID) returned value
(NTUSER)? I don't mind having to use this code for each field in my form,
and in fact it would be desirable so I could still allow them to write in
fields that should be available to all?
> If you are not up to the potentially strenuous exercise of implementing MS
> Access security (make backups before you even start!), a simpler solution
[quoted text clipped - 24 lines]
> >
> > Thanks in advance for any help~!
Jeff Boyce - 14 Jul 2007 01:01 GMT
The mechanism that works for you will be the one you work out. The concept
is to compare the logged on user's identity with a list. I provided one way
to do this.
Another might be to open a recordset containing all the rows of the table
you mention where NTUSER = your users logon. You could then iterate through
the records, setting control properties on the form.
Regards
Jeff Boyce
Microsoft Office/Access MVP
> Okay, I am liking this train of thought!
>
[quoted text clipped - 37 lines]
>> >
>> > Thanks in advance for any help~!