Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open record in a form depending on user?

Status
Not open for further replies.

snuffi01

Technical User
May 24, 2003
26
SE
Is it possible to have some code on a form (on open) wich opens a specific record depending on wich user (using access security) is logged in?
Example: the user Peter is logged in and he opens the user form (a form in wich he can change parameters of him selfe) the form opens the record wich has the Namefiled=Peter.
Is this possible?
Please leave some code example since i'm not so god in coding my selfe.
 
You could do it from the source of the code that opens the form. Say you have a menu that has a command button that opens the form. Here you could say...

DoCmd.OpenForm "MyForm", , ,"Namefiled = 'Peter'"



ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top