On open event for form

G

Guest

Is it possible to have a form open up (in a secured database) to display only
the records of the person sign on and if Admin or Full Permissons to display
all records within the form?
 
L

Lynn Trapp

G

Guest

Thank you for your reply. I haven't tried this yet but, the form is set to
Data Entry, will this matter?
 
L

Lynn Trapp

You won't be able to see older records with it set that way, but will be
able to enter the user name into the table with it. You'll need to set the
form to view all records and base it on a query that filters for the user
name = CurrentUser() to let them see old records for their user name.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
G

Guest

If I change the form to Data Entry = No and then use the
CurrentUser()Function, will this allow the person (based on signon name) to
see only records pertaining to them. I would need to base the form on a query
to do this do I. And one more question, would I put the currentuser function
in the Forms; OpenEvent ?

thanks again
 
L

Lynn Trapp

If I change the form to Data Entry = No and then use the
CurrentUser()Function, will this allow the person (based on signon name)
to
see only records pertaining to them.

If, and only if, you have entered the correct Username in each record
I would need to base the form on a query
to do this do I.
YES!

And one more question, would I put the currentuser function
in the Forms; OpenEvent ?

NO! In the BeforeUpdate event of the record add the code to set the UserName
field to CurrentUser()

If IsNull(Me.UserName) Then
Me.UserName = CurrentUser()
End If


--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 

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