Adding a space between fields

J

Jennifer

In my query I have:

Division: [Division] & [District]

this pulls a division name and a district. It is linked to a report and I
want it to appear as Division - District.

How can I get a space between the fields. Should I format in the query or
report?
 
J

John Spencer

In a query you would need
Division: [Division] & " " & [District]

IF you need to do it on the report you would set a control's source to
= [Division] & " " & [District]
and the control must have a name other than Division or District.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
L

Lynn Trapp

Hi Jennifer...

You need to simply concatenate the dash and 2 spaces between your fields,
like this:

Division: [Division] & " - " & [District]
 
D

Dale Fye

Try:

Division: [Division] & " - " & [District]

Or, if there is a chance that [District] will be NULL and you want to avoid
the " - " if it is, then try:

Division: [Division] & (" - " + [District])

----
HTH
Dale

Division: [Division] & [District]
 
V

vanderghast

Division & " " & District

or

Division & " - " & District


if you want the - too.


Note that the alias has the SAME name as an original field, some possible
confusion here.


Vanderghast, Access MVP
 

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

Similar Threads


Top