Windows XP login name into a text box

A

Anne

How do I Place the Windows XP User Logon Name in a Control (text box) on a
Form in Microsoft Access
 
A

Anne

I did the following but access does not like the fact that two functions are
declared and I am receiving an error

The module is putting a line under the first declared function and is
treating it as two separate functions.
 
D

Douglas J. Steele

What do you mean by "putting a line"?

Realistically, you do have 2 separate functions there. The first tells
Access the details about a function built into advapi32.dll. The second uses
the first function to get the information you want.
 
J

James

Hello Ofer,
I have studied various threads on this topic, but as a rookie, i'm not
really understanding what i need to do to make this work.

At the weblink, it says to copy the code... but to where ?
Do I first need to add a field to my table (& form) to hold the current user
name?

James
 
K

kalexander

I used the code above to create a user name field on my form - and did the
same thing in a query field. The problem I'm having is that for both the form
and query-based fields the user name for the current user populates for ALL
the records. How can I tie it just to the user who entered the record?
Ideally this would be tied to the query-based field for reporting purposes.
Thanks for your input.

Alex
 
Top