Full Version: Trying to combine fields on report, receiving error
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
Dpinion
I have an "address" field where I am trying to do the following:

CODE
=[Company] & Chr(13) & Chr(10) & [Name] & Chr(13) & Chr(10) & [Phone] & Chr(13) & Chr(10) & [address] & Chr(13) & Chr(10) & [zip]


Unfortunately whether I place the = at the beginning or not, I receive an error when I try to preview the report. Is there a better way to combine these fields?

TIA
Peter46
What is the error?

Can any of the fields be null?
Dpinion
Sorry, it was just showing #error

I think I got it figured out though. I hadn't renamed the text field from its original "Company", so when I put =[company] it was trying to call to itself I believe. I changed the field name and all is well (I also changed [name] to [contact_name].

Thanks!
AQM_UK
Just to say that I woul do this in the query and not directly on the report.

Any time I can do it in the query I do, and only put calculations on the report when I only have to.

Jim
Dpinion
Thanks Jim,
I will have a look at doing it that way. If I place it in the query it will still handle the Chr(13) and Chr(10) ok?
AQM_UK
Got to confess, don't know. Have a try and see. It can only bite you.

Jim
Dpinion
Heh, works out OK. Thanks for that.
AQM_UK
Thought it did but was not sure. Glad you got there okay then.

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