Full Version: Report gives error when concatenating fields
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
repasky
I know I have had this problem before, but I can not seem to resolve this. I have a report where I want to print 2 files together and put a slash in between.

Like this:
[tField1] & "/" & [tField2]

I get #error. Both fields are from the same input table.

I tried Ltrim () function also, but does not work.

What do I do?

Al
kuifjexx
The control source must be =[tField1] & "/" & [tField2]

Do not forget the '='

Greetz from Belgium compute.gif

Luc aka Kuifjexx
repasky
Sorry, I forgot the '=' sign in the message, but it was not forgotten in the program. It just does not work.

Al
mvos
Hi,

Are [tField1] and [tField2] text or numeric fields?
kuifjexx
Can you give us info about the datatypes and contents of the fields?

Greetz from Belgium compute.gif

Luc aka Kuifjexx
repasky
=[tMaintMonths] & "/" & [tMaintMiles]

This is the actual entry that I am trying to print.
Al
repasky
They are both text fields. One is 4 chars and the other is 10 chars.
Al
mvos
What happens if you do this in the query instead

fldCombined:[tMaintMonths] & "/" & [tMaintMiles]

and then use fldCombined in the report.
repasky
John,

Sorry, I left my computer for the evening and just got back. With the 5 hours difference, you will not see this until tomorrow.

Thanks, that did it. I never knew you could do that trick. Works great.

I have had this problem before, and I know it should have worked the original way.

Al
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.