Access 2003 Reports

S

Scott

Hello,

I am generating a report from an Access database. My question is this:
If two fields (say first name and last name) have a size of 25 max
characters, when you place those fields on the report (side by side), if the
first name is only 3 characters long, the last name is not placed right next
to the first name. You get 22 blank spaces and then the last name.

Is there a way to get Access to remove spaces in a field, so when they are
placed a report, side by side, they appear next to each other?

Thanks
 
G

George Nicholson

Concatenate (i.e., combine) the values together in one field. Use something
like the following for the textbox ControlSource property:
= Trim([FirstName]) & " " & [LastName]

Make sure the textbox is named something other than FirstName or LastName,
otherwise Access will not know whether you want the textbox or the field
called FirstName. This would cause it to return a #Name error.

If you do change the control name and have "Perform name AutoCorrect" turned
on, double check that changing the control name hasn't incorrectly "fixed"
the field names in your ControlSource formula at the same time (or, even
better, turn AutoCorrect off: Tools>Options>General).

HTH,
 
S

Scott

Thank you!

George Nicholson said:
Concatenate (i.e., combine) the values together in one field. Use something
like the following for the textbox ControlSource property:
= Trim([FirstName]) & " " & [LastName]

Make sure the textbox is named something other than FirstName or LastName,
otherwise Access will not know whether you want the textbox or the field
called FirstName. This would cause it to return a #Name error.

If you do change the control name and have "Perform name AutoCorrect" turned
on, double check that changing the control name hasn't incorrectly "fixed"
the field names in your ControlSource formula at the same time (or, even
better, turn AutoCorrect off: Tools>Options>General).

HTH,
--
George Nicholson

Remove 'Junk' from return address.


Scott said:
Hello,

I am generating a report from an Access database. My question is this:
If two fields (say first name and last name) have a size of 25 max
characters, when you place those fields on the report (side by side), if
the
first name is only 3 characters long, the last name is not placed right
next
to the first name. You get 22 blank spaces and then the last name.

Is there a way to get Access to remove spaces in a field, so when they are
placed a report, side by side, they appear next to each other?

Thanks
 

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