Spacing - Printing 2 fields next to each other

  • Thread starter Thread starter RickC
  • Start date Start date
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
 
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])
 
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,
 
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


.
 
Back
Top