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

Query Expression Populates with ID instead of Name

Status
Not open for further replies.

pcolvin

Technical User
Oct 17, 2008
22
US
I have a query that pulls data from a number of tables and combines the data into sentence structure for a report. For example, the query takes a clients first and last name and combines it with a salutation such as "Dear John Doe,"

The error I get is when I am added my employees name into a sentence using a field called "Assigned To" Instead of the employees name populating, I get the employee ID number.

Here is the expression I am using:

Paragraph 1: "Thank you for participating in our Outreach Initiative and meeting with " & [Assigned To] & " on " & [Scheduled Date] & ". We hope our visit was informative and beneficial."

When i run the query, the feild "Assigned To" is correct, but in the expression it is not. Please let me know how I can get it to populate the name rather than the ID.

THANKS
 
try
Adding an alias to the assigned to name and use the alias
 
Thanks for the idea, but after creating an alias and running the query again, it still populates with employee's ID number rather than their name.
 
Actually, I was able to pull the employees names directly from the employee table rather than from the "Assigned To" field on the client table. Then I used an Alias for the employees' First Names and Last Names and updated the expression, so it works now. THANKS for your idea about using an alias, it gave me the ability to pull from the other table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top