Retrieve Login Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I just tried to display the current Access users loginname with the
following script found on this forum:
http://www.mvps.org/access/api/api0008.htm

But I can't figure out how to get this to work. I just want to display the
current username in a TextBox as a Default Value.

Can anybody help me? I'm not a real pro in coding, but I can understand what
is meant and what to do..

Thanks in advance
 
Copy and paste the code into a standard module as the web page describes,
then enter the following as the Default Value property of the text box ...

=fOSUserName()
 
Copy everything from between the Code Start and Code End lines into a new
module, and save the module. Make sure you don't name the module fOSUserName
(modules cannot be named the same as routines that they contain) Also, make
sure you're not using a Class module.

Put =fOSUserName() as the DefaultValue property for the textbox in your
form. Include the equal sign and parentheses. Note that this will only work
in forms: you cannot use a user-defined function as a default value for a
field in a table.
 
Is this possible for users on Windows 98 OS?

Douglas J Steele said:
Copy everything from between the Code Start and Code End lines into a new
module, and save the module. Make sure you don't name the module fOSUserName
(modules cannot be named the same as routines that they contain) Also, make
sure you're not using a Class module.

Put =fOSUserName() as the DefaultValue property for the textbox in your
form. Include the equal sign and parentheses. Note that this will only work
in forms: you cannot use a user-defined function as a default value for a
field in a table.
 

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

Similar Threads

How to Capture the Value of "User Name" (or Initials) in Access 2007 4
Creating a user usage log 1
SetTempVar 2
fOSUserName 17
User ID's 3
Get User Login Name 10
how to check login 2
Use text box to call Function 4

Back
Top