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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofill Text Box with name based on Network User ID

Status
Not open for further replies.
Aug 27, 2002
19
US
Hi,
I am desperate for help! I am developing a time-tracking database with a time-entry form which will be used by each person in our dept.
I have a query that uses a function and identifies the network user ID of the person logged on and their name. I would like the employee name to autofill when the time entry form is opened. How can I do this??
Here is the SQL for my GetUser query:
SELECT Employees.UserID, Employees.[Employee Name]
FROM Employees
WHERE (((Employees.UserID)=NTDomainUserName()));

Sandi
 
In the On Open event procedure of the form, add me.TextBoxName=NTDomainUsername()

David
 
Thanks David- that worked and did autopopulate the network user ID.
Now how do I get it to actually fill in the Employee's name?
Sandi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top