Name in short

  • Thread starter Thread starter Frank Situmorang
  • Start date Start date
F

Frank Situmorang

Hello

I want to prepare a report which has name of members in short form

for example: Johannes Muda Hutauruk from First, Middle and Last Name. I
want to make a calculated field in the query to have it shown on the report:
like this : J. M. Hutauruk,

Can anyone help me how can I make it? Coz I tried to search the function of
Concatenate like in excel, but I can not find it.
 
Frank Situmorang said:
Hello

I want to prepare a report which has name of members in short form

for example: Johannes Muda Hutauruk from First, Middle and Last Name. I
want to make a calculated field in the query to have it shown on the
report:
like this : J. M. Hutauruk,

Can anyone help me how can I make it? Coz I tried to search the function
of
Concatenate like in excel, but I can not find it.
 
Hi Frank,

The simple way is a calculated field like this:
ShortName: Left([FirstName],1) & ". " & Left([MiddleName],1) & ". " &
[LastName]

However, this will give extraneous ". " characters if either FirstName or
MiddleName are null. You can avoid that by a slightly more complicated
expression:
ShortName: IIf(Not IsNull([FirstName]),Left([FirstName],1) & ". ") &
IIf(Not IsNull([MiddleName]),Left([MiddleName],1) & ". ") & [LastName]

HTH,

Rob
 
Thanks Rob, you are very helpful to me.

--
H. Frank Situmorang


Rob Parker said:
Hi Frank,

The simple way is a calculated field like this:
ShortName: Left([FirstName],1) & ". " & Left([MiddleName],1) & ". " &
[LastName]

However, this will give extraneous ". " characters if either FirstName or
MiddleName are null. You can avoid that by a slightly more complicated
expression:
ShortName: IIf(Not IsNull([FirstName]),Left([FirstName],1) & ". ") &
IIf(Not IsNull([MiddleName]),Left([MiddleName],1) & ". ") & [LastName]

HTH,

Rob

Frank Situmorang said:
Hello

I want to prepare a report which has name of members in short form

for example: Johannes Muda Hutauruk from First, Middle and Last Name. I
want to make a calculated field in the query to have it shown on the
report:
like this : J. M. Hutauruk,

Can anyone help me how can I make it? Coz I tried to search the function
of
Concatenate like in excel, but I can not find it.
 
Back
Top