Concatenating fields on a report

upsman

Registered User.
Local time
Today, 15:07
Joined
Jul 22, 2005
Messages
26
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
 
=[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
 

Users who are viewing this thread

Back
Top Bottom