Combine a data field and label text in a report

D

Doug F.

I need to print "Your membership expires on April 1, 2007. Please do ....."
in the detail of a report, April 1, 2007 is a data field. I'm thinking that
the function 'Trim' to concatenate all the bits might be a solution. Better
thoughts, thanks.

Doug
 
L

Larry Linson

Doug F. said:
I need to print "Your membership expires on April 1, 2007. Please do ....."
in the detail of a report, April 1, 2007 is a data field. I'm thinking
that
the function 'Trim' to concatenate all the bits might be a solution.
Better
thoughts, thanks.

The LTrim, RTrim, and Trim functions eliminate leading, trailing, and both
leading and trailing blanks from a string. They are often used when
concatenating strings, but they do not, themselves, concatenate anything.

There's no reason to store data in a label... store it in a Table, or store
it in a variable. Then use the concatenation operator & or + to concatenate.
The difference is that <anyvalue> & Null yields <anyvalue> but <anyvalue> +
Null yields Null.

Larry Linson
Microsoft Access MVP
 
O

Ofer Cohen

I assume that what you are looking for, to combine a text with a field in the
table, in the control surce of the text box in the report write

="Your membership expires on " & [FieldName] & ". Please do ....."
 
D

Doug F.

Thank you. A text box rather than a label!

Ofer Cohen said:
I assume that what you are looking for, to combine a text with a field in the
table, in the control surce of the text box in the report write

="Your membership expires on " & [FieldName] & ". Please do ....."
--
Good Luck
BS"D


Doug F. said:
I need to print "Your membership expires on April 1, 2007. Please do ....."
in the detail of a report, April 1, 2007 is a data field. I'm thinking that
the function 'Trim' to concatenate all the bits might be a solution. Better
thoughts, thanks.

Doug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top