How to eliminate text adjacent to field when field has no data?

J

jmuirman

This is in my query --- FirstPayDateAge: [FirstPay1] & " at age " & [BegAge]

When I don't want to put a date in the [FirstPay1] field, how can I
eliminate the text ---- "at age"?

(1) Here's the way it looks when I enter a date in [FirstaPay1]: 10/1/2015
at age 45

(2) Here's the way it looks when I leave[FirstaPay1] blank: at age

Thanks,

John
 
D

Douglas J. Steele

FirstPayDateAge: IIf(IsNull([FirstPay1]), "", [FirstPay1] & " at age " &
[BegAge])
 
J

jmuirman

It works!! Awesome!

Thank you!

John

Douglas J. Steele said:
FirstPayDateAge: IIf(IsNull([FirstPay1]), "", [FirstPay1] & " at age " &
[BegAge])

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



jmuirman said:
This is in my query --- FirstPayDateAge: [FirstPay1] & " at age " &
[BegAge]

When I don't want to put a date in the [FirstPay1] field, how can I
eliminate the text ---- "at age"?

(1) Here's the way it looks when I enter a date in [FirstaPay1]: 10/1/2015
at age 45

(2) Here's the way it looks when I leave[FirstaPay1] blank: at
age

Thanks,

John
 

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