On open event for form

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
Thank you for your reply. I haven't tried this yet but, the form is set to
Data Entry, will this matter?
 
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
 
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
 
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
 
Back
Top