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

Selecting records at runtime 1

Status
Not open for further replies.

dabones99

Technical User
Oct 4, 2002
20
US
Hi all

I have a form that I print letters from. I want the name of the current User to be printed on the letter when it is printed. I have a table with user names and userid, and I have a field for userid in my main table.

How can I tell the program to give me the user name from the user table based on the CurrentUser property, when I click the print button?

Thanks in advance.
 
So basically you have a place to enter the user ID and you want to be able to hit print and have it print the letter with that user's name inserted in the proper places?

I'm not sure I understand exactly...

All lessons learned from the School of Hard Knocks........at least tuition is cheap.
 
No, I grabbed the userid using the CurrentUser property when the user logs on, so I already know which user it is.

What I want to do now is: using that userid, get the User's name from the Users table and print it on the letter...
 
Take a look at the DLookUp function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top