View Full Version : Field display in report ........Help Please


mcreedie
02-28-2001, 07:56 AM
I have a basic report and i need to display three fields (title, forename and surname) the same distance apart irrespective of the length of field.
At the moment I have got three seperate text boxes displaying the fields and the result is the same as below:

Mr Rob McCreedie

whereas what I want it to look like is:

Mr Rob McCreedie

Please help..

Many thanks in anticipation

llkhoutx
02-28-2001, 08:08 AM
Concantenate the three field: f1 & " " & f2 & " " & f3.

This won't be correct of you have a blank middle filed, therefore,

iif(isnull(f1),"",f1 & " ") & iif(isnull(f2),"",f2 & " ") & f3

or some variation thereof.

Chris RR
02-28-2001, 09:19 AM
It can also help if you do a Trim or Trim$ before you do the concatenation (depending on your data). Also, check out the + symbol as a concatenator. It would conditionally put the period in after the title:
=Trim([Title]) & ". " + Trim([FirstName]) & Trim([LastName])