if null, replace with text

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

Guest

I have a Form listing all "Projects" with a subform listing all "ReportlDates"
My report lists [ProjectNames] and [MaxOfReportDate] to show last reporting
date. My join is set to show ALL Project names, so a blank will appear at
the [MaxOfReportDate] if none exists. I want the text “none reported†to
appear in place of the blank. How and where do I code this? Thanx - Dave
 
I have a Form listing all "Projects" with a subform listing all "ReportlDates"
My report lists [ProjectNames] and [MaxOfReportDate] to show last reporting
date. My join is set to show ALL Project names, so a blank will appear at
the [MaxOfReportDate] if none exists. I want the text ´none reported¡ to
appear in place of the blank. How and where do I code this? Thanx - Dave

Several ways.
Use an unbound text control in the report.
Set it's control source to:
= IIf(IsNull([MaxOfReportDate]),"None reported",[MaxOfReportDate])

or use
=Nz([MaxOfReportDate],"None Reported")
 
In addition to Fred's methods you can use the format property of the
relevant control

Format: @;"None Reported"

fredg said:
I have a Form listing all "Projects" with a subform listing all
"ReportlDates"
My report lists [ProjectNames] and [MaxOfReportDate] to show last
reporting
date. My join is set to show ALL Project names, so a blank will appear
at
the [MaxOfReportDate] if none exists. I want the text ´none reported¡ to
appear in place of the blank. How and where do I code this? Thanx -
Dave

Several ways.
Use an unbound text control in the report.
Set it's control source to:
= IIf(IsNull([MaxOfReportDate]),"None reported",[MaxOfReportDate])

or use
=Nz([MaxOfReportDate],"None Reported")
 
Thanx - the Nz function worked - can't get the IIF stmt to work - getting a
syntax error -

fredg said:
I have a Form listing all "Projects" with a subform listing all "ReportlDates"
My report lists [ProjectNames] and [MaxOfReportDate] to show last reporting
date. My join is set to show ALL Project names, so a blank will appear at
the [MaxOfReportDate] if none exists. I want the text “none reported†to
appear in place of the blank. How and where do I code this? Thanx - Dave

Several ways.
Use an unbound text control in the report.
Set it's control source to:
= IIf(IsNull([MaxOfReportDate]),"None reported",[MaxOfReportDate])

or use
=Nz([MaxOfReportDate],"None Reported")
 
Back
Top