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

Custom Names on reports 1

Status
Not open for further replies.

paul123456

Technical User
Apr 29, 2002
518
US
We have about 10 users that use our database to send letters out to clients. We have it set up now so that the user copies the front end database and modifies all the letters in the reports with there Name and Title so that the client will call them. I wanted to know if the database can have a pop-up when u open it that asks..Please enter your full Name...Then it asks Please enter your title. so that when each user opens the database the appropriate name will fill the from box in the reports.?? is this possible to do? maybe if i create a table called employees and have the reports referenced to it? can someone give me an idea of how i could set this up? Thanks, PAUL

 
Set the ControlSource of each field on the report to:

YourNameField: = Inputbox ("Please enter your name")
YourTitleField: = Inputbox ("Please enter your title")
 
you could even be fancier: based on who is logged on to the machine, you can look up in a table the NAME and TITLE so the user doesnt have to do anything.

to get the Logon ID of the user, use
Code:
environ("Username")
like this:

in a table (USERS), have each logon ID (USERID) along with the NAME and TITLE. a bit irritiating to get all the data together, but once it's set up, it's done. you'd have to make a place later so each user can change their NAME (get married/divorced) and TITLE (change jobs).

then on the report, you can put in the NAME box:
Code:
=DLookUp("Name","Users","UserID = '" & Environ("Username") & "'")
and similarly with the TITLE.
 
Since i have about 20 letters as reports in the dbase i think GingerR idea will be best...but gingerR i don't understand...you say "based on who is logged on to the machine"? do u mean the dbase? if so i am not using user groups or permissions, but if i have to i will set it up so that it'll work. can u explain a little more on how it is set up? Thanks, PAUL

 
no not the groups or permissions thing--when you log onto your computer in the morning, you have to put in a user id right? everyone in your company does this--unique NT logon id's so you have permission to your servers?

try this: make a NEW query

add any table you want (as long as it has at least one row of data in it) from the popup 'show table' box

in the first column, put this:
Code:
 Environ("Username")

run the query and let me know what it says.
 
it has a repeat of my
first initial+lastname

Do you think it can use the display name some how?



Thanks, PAUL

 
ohhh i c what your trying to do now....very very good idea...let me test and i'll get right back to you. Thanks, PAUL

 
Works great...thnx GingerR, what a great idea Thanks, PAUL

 
sorry i didnt get back to you yesterday--good for you!! yes my first little suggestion was a test to see how your company has their logon ID's set up. again, good for you for figuring it out!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top