On my shipping invoices, which are reports, I'm trying to display a line
that shows the following line: From Origin to Destination (Origin and
Destination being fields in the source query)
As the length of the Origin town varies I don't want to use fixed fields for
each value as this would either leave ugly gaps or the data would overwrite
each other.
So I have tried to concatenate everything in one textbox, with the word "to"
sandwiched in the middle. This is what I have tried:
=[Origin] & " " & to & " " & [Destination]
(I also tried it with extra quotes around "to" but then it printed it
exactly like that, showing the quotes).
Depending on what I do with the the position of the spaces and the
ampersands, I either get an incorrect syntax message or Access thinks that
the word to is a parameter and throws square brackets around it and asks me
for input when I run the report.
Where am I going wrong?
Many thanks
CW
BruceM - 14 Jan 2008 12:35 GMT
No need to treat the spaces differently than any other text. A space can be
included at the beginning or end of a text string just as it can be included
between words within a text string.
="From " & [Origin] & " to " & [Destination]
> On my shipping invoices, which are reports, I'm trying to display a line
> that shows the following line: From Origin to Destination (Origin and
[quoted text clipped - 18 lines]
> Many thanks
> CW
Dale Fye - 14 Jan 2008 13:26 GMT
Have you tried:
=[Origin] & " to " & [Destination]
HTH
Dale

Signature
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.
> On my shipping invoices, which are reports, I'm trying to display a line
> that shows the following line: From Origin to Destination (Origin and
[quoted text clipped - 14 lines]
> Many thanks
> CW
CW - 14 Jan 2008 16:39 GMT
That did it perfectly! Many thanks Dale!
CW
> Have you tried:
>
[quoted text clipped - 21 lines]
> > Many thanks
> > CW