Spacing - Printing 2 fields next to each other

R

RickC

I have a field (firstname) and a field (lastname). My
report is a thank you card which needs to print ... "Dear
(firstname) (lastname).

How do I specify this so that the space between the two
fields is truncated ?

Thank you
 
D

Douglas J. Steele

Rather than having two separate fields, concatenate them into one. You can
do this in your query (FullName: [FirstName] & " " & [LastName]), or you can
have a single text box on the report, and set its ControlSource to
=[FirstName] & " " & [LastName]. My preference is the former.

Note that in some cases (such as when you're pulling data from SQL Server),
the names may have concatenated blanks on them. If that happens, use the
RTrim function: FullName: RTrim([FirstName]) & " " & RTrim([LastName])
 
C

Cheryl Fischer

I would create a new, unbound textbox (named, for example, txtFullName) on
the Report and concatenate the two fields within that textbox. The
ControlSource property for the text box would be:

=[FirstName] & " " & [LastName]

hth,
 
G

Guest

Thank you - perfect... and I did use your advice to do it
in the query. Sure saves time later.

Rick
-----Original Message-----
Rather than having two separate fields, concatenate them into one. You can
do this in your query (FullName: [FirstName] & " " & [LastName]), or you can
have a single text box on the report, and set its ControlSource to
=[FirstName] & " " & [LastName]. My preference is the former.

Note that in some cases (such as when you're pulling data from SQL Server),
the names may have concatenated blanks on them. If that happens, use the
RTrim function: FullName: RTrim([FirstName]) & " " & RTrim([LastName])

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



I have a field (firstname) and a field (lastname). My
report is a thank you card which needs to print ... "Dear
(firstname) (lastname).

How do I specify this so that the space between the two
fields is truncated ?

Thank you


.
 

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