How to make text disapear when [field] next to is isn't used?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like this code:

" & [date of 1st payment1]& " " & [begage] & " " & [lastpymt] & " " & [date
of last payment1] & " " & [endage]

to read in a report like:

....7/1/2005 age 55...7/1/2025 age 75

and when there is no data in [endage], I would like "age to dissapear like:

....7/1/2005 age 55...

Thanks for your help!!

John
 
What'll be in [date of last payment1] and [endage] if there is no data: a
Null value?

If it's Null, you can use something like:

" & [date of 1st payment1]& " " & [begage] & (" " + [lastpymt] + " " + [date
of last payment1] + " " + [endage])

If it's going to be something else, you might have to use

" & [date of 1st payment1]& " " & [begage] & IIf([endage] = ??, "", " " &
[lastpymt] & " " & [date of last payment1] & " " & [endage])

where ?? is whatever value will distinguish endage.
 
Back
Top