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

Concatenate many records into a text field

Status
Not open for further replies.

kimmer7389

Technical User
Nov 27, 2001
95
US
I am trying to Concatenate many records into a single text field on a report.

I have 2 tables.

tbl_Procedures
PK - ProcedureID - Autonumber
Procedure - Text

tbl_ProcSedationFinal
PK - MRN - Number
Procedure - Number

I would like for all the procedures to be listed in a text field on a report and it would look something like this:

Procedure 1, Procedure 2, procedure 3

I am using the example found at
In the text field on the report I am using an expression for the source and it looks like this:
=ConcatRelated("ProcedureID","tbl_Procedures","Procedure = " & [ProcedureID])

This isn't working though. I keep getting the popup asking me to enter a parameter value for ProcedureID. And then I get an error message that says "Error 3075: Syntax error (missing operator) in query expression 'Procedure='"

I know I am probably missing something simple like a quotation or a comma but I am at my wits end.

Thanks for your help
Kim
 
Thanks for the function.

I can't seem to get the expression to work in a textfield on a report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top