Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Environ("Username") problem

Status
Not open for further replies.

hpl2001

Programmer
Dec 18, 2001
105
CA
Hello. I'm trying to insert the NT username of the current user into my database, using the following code:

[User Name] = Environ("Username")

I am getting an error that says 'can't find the field '|' referred to in your expression'

In my table, User Name is defined as a text field.

TIA

Holly
 

Do you have a field (a text box maybe?) on your Form named [User Name] ?
In my table, User Name is defined as a text field.
So it looks like you want to write the Username into a field in your database? If so, what's the WHOLE Update or Insert statement that you have?

Have fun.

---- Andy
 
Thank you. That reminded me that I hadn't updated the query with that new field. It works now.

H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top