Best way to add user names to form in MSAccess

I have a database I am building in 2003.  I need recommendations from the experts on how I would auto insert the current user into a form.  

There will be multiple users in different locations across the US but on same server.

I am thinking I just have them select their name on the main form and then it autopopulates into the fields that requires their name.  

Thanks in advance.
leezacAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mbizupCommented:
How are you logging users in?

At login time, you can save a sign on name as a global variable (gSignOn).

Then in the current event of relevant forms, you could do this:

' Autopopulate this field in new records (but don't overwrite existing ones)
If Me.NewRecord = true then Me.txtSignOn = gSignOn
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pteranodon72Commented:
The code in following link will fetch the user's Windows login:

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

You can create a new textbox on a form and set its Default Value to:
=fOSUserName()

Set that text box to Locked=Yes, Enabled = No
This would then require no user interaction. In fact, it doesn't need to be visible.

Hope this helps,

pT72
0
leezacAuthor Commented:
Thank you - very helpful.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.