Choose username once per session and have it saved with each record

  • Thread starter Thread starter A Felton
  • Start date Start date
A

A Felton

I want users to choose their name once from a lookup at the start of a
session, then have the name appear on the main log details form and be
saved with each record. Any help woudl be appreciated
 
A Felton said:
I want users to choose their name once from a lookup at the start of a
session, then have the name appear on the main log details form and be
saved with each record. Any help woudl be appreciated

You can automatically get their login name using the following code:

http://www.mvps.org/access/api/api0008.htm

Add the function to the textbox's Default Value property (on the data tab).
Like:

=fOSUserName()

If you want to choose the name, you'll need to either store it in a public
(global) variable or keep the login form open (you can hide it instead of
closing it) and use the the following syntax in the Default Value property:

= [Forms]![LoginFormName]![LoginTextboxName]
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top