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

Concantenate problem with report with parameters

Status
Not open for further replies.

ziggs

Technical User
Sep 21, 2000
195
US
Ok, if I enter =[LastName] & ", " & [FirstName] in the control source, I would get Doe, John. However, I'm not getting this on a particular report. I think I narrowed it down as to why. My report is based on a query that sets a parameter for a particular field. Thus, when I enter =[LastName] & ", " & [FirstName], I have three parameter boxes instead of one. The original plus Last Name then First Name.

How can I concantenate the names without having the first and last name parameter boxes and still keep the parameter that I need for the original search criteria? [sig][/sig]
 
since you are using a query for the report, why not add an expression field in your query to show the formatted name

MyName: [LastName] & ", " & [FirstName]

then just use MyName as the ControlSource for the TextBox in your Report

PaulF [sig][/sig]
 
PaulF, Thanks for replying. However...

That's what I'm doing and it's giving me parameter boxes for the first name and then one for the last name.

Just in case I misunderstood, this is exactly what I've entered

In query design and in the "field" I put in
MyName: [LastName] & ", " & [FirstName]

Then on my report I put in Myname as teh controlsource [sig][/sig]
 
Hi,
I don't think that it is your concantenation. I assume that you have LastName and FirstName fields in the table which you are querying off of. The most likely case is that [LastName] is [Last Name] and [FirstName] is [First Name]... check the names of the fields to see that they match.
Rob Marriott
CCTC1
rob@career-connections.net [sig][/sig]
 
also did you setup those parameters in our query???


James [sig][/sig]
 
If I understand your problem correctly. . .why not have the
FullName: [FirstName] & " " & [LastName] field in the query without a parameter prompt. Then put [LastName] in a separate query column with the parameter prompt at the bottom (same for [FirstName] if you need that degree of .
precision. Having the last name separate also allows bringing the query table into the report already sorted by last name when you're not limiting the results to one person.

Hope this helps.


FYI the word is spelled "concatenate" [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top