Setting limits

  • Thread starter Thread starter francisco
  • Start date Start date
F

francisco

I just secured my database, but I don't know how to limit
a user to entering to a specific form.
EX:
I have a switchboard that automatically opens and has 3
choices. How can I limit a user so he or she cannot access
one of those.
And also I don't want for that user to access the database
where all the objects are available.
Is this possible?
Thanks
 
Did you read and follow the MS Access Security FAQs (available from the MS
website)? This is essential reading for properly securing an Access
database, and there are a couple of examples of determining permissions. The
following is taken straight from that document:

Dim db as Database
Dim con as Container
Dim doc as Document

Set db = DBEngine(0)(0)
Set con = db.Containers("Forms")
' refresh to make sure the collection is current
con.Documents.Refresh
Set doc = con.Documents("Employees")
con.UserName = "Users"
If (doc.permissions And acSecFrmRptExecute) > 0 Then
Debug.Print "Users group can open Employees form"
Else
Debug.Print "Users group can't open Employees form"
End If

Also, I would encourage you to purchase the Access Developer's Handbook
which is relevant to your version of Access ... they too are indispensible,
and are loaded with tons of information about Security and Access ...
 
Back
Top