user permissions in access 20003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
Back
Top