user permissions in access 20003

T

Todd

I secured my dbase and one of the groups I used was "Full Data Users". This
is the group where I've assigned most of my users. Once logged in the user
has the option to choose one of the regions to enter monthly vehicle
information. I'd like to restrict the user to where they can only open their
specific region to view and change data. How can I do this?
 
K

Keith Wilby

Todd said:
I secured my dbase and one of the groups I used was "Full Data Users".
This
is the group where I've assigned most of my users. Once logged in the
user
has the option to choose one of the regions to enter monthly vehicle
information. I'd like to restrict the user to where they can only open
their
specific region to view and change data. How can I do this?

You need some way of associating the user with a region, probably in a
lookup table. You could then use the CurrentUser property in a DLookup
function to set the main form's recordset accordingly. Untested air code
for the form's load event:

Dim strSQL As String

If Not IsNull(DLookup("MyField","qryMyQuery","[UserName] = " & CurrentUser))
Then
strSQL = "Select * from qryMyQuery Where [UserName] = " & CurrentUser
Me.RecordSource = strSQL
Else
MsgBox "No records for the current user."
DoCmd.Quit
End If

HTH - Keith.
www.keithwilby.com
 

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