How can User name appear in field on form

H

Hawaiian Jack

I had an answer earlier but with not enough details to try it. The answer
was from Dev Ashish and provided code to paste into a new module of the
database I'm working with on the work lan. Unfortunately, I need more
details on what area to copy and paste into the module; what to name the
module; then do I make a macro to use to extract the module in the properties
of the forms that I want to show the individual's name when it opens for data
input. Hopefully, there must be a way as Access 97 did it perfectly with
only "=Environ$("User") in the default line on the form's properties. Help
again please. Thank you. Jerry Jackson.
 
D

Duane Hookom

Open a new blank module. Copy and paste the code from
http://www.mvps.org/access/api/api0008.htm into the module. Save the module
with a name like "basAPIFunctions" or "modAPIFuncs" or similar. You can then
use the function fOSUserName() anywhere that you might use any other
function that returns a value. For instance, you can set the default value
of a text box to:
=fOSUserName()
or display the user name in a query
User: fOSUserName()
 

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