Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

How to restrict field read/write authority for some users?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J. Keggerlord - 13 Jul 2007 17:36 GMT
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 restrict,
say, a text box or drop down menu from being selectable or editable
(essentially, read-only access) to some users while allowing others to have
full editing capability?  Example:

Table:  tblMainTable
Fieldname:  txtRecord
Module value returned:  NTUSER

Thanks in advance for any help~!
Jeff Boyce - 13 Jul 2007 18:24 GMT
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~!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.