View Full Version : Concatenating fields on a report


upsman
08-21-2005, 12:19 PM
I need to print 2 records on a single line of a report so I'm attempting to concatenate the 2 records into one but I keep getting errors. Here's my code:

Me!txtPrintLn = Me![ClassName] & " " & Me![InstructorID] & " " & Me![RoomNumber]

When it runs, it says it can't find the field 'ClassName'. If I put the field in the report by itself, it's fine. I've also tried

Me!txtPrintLn = [Classes].[ClassName] & " " & [Classes].[InstructorID] & " " & [Classes].[RoomNumber]

but is says it can't find the field '|' in the expression.

What is the proper syntax to combine the fields together? Is there another way of printing 2 records on a single report line?

Rod

Rich
08-21-2005, 12:59 PM
=[Field1]&" "&[Field2] as the control source of your textbox, no vba is required. Make sure the control does not have the same name as either of your fields