replacing 0 (zero) with words

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I have a report that show the value of a price, format general number = eg
3,500

I need, when this is 0 (zero) ie not set that the report displays "Awaits",
I'm happy with VBA but can't work this one out!!

Any help would, of course, be appreciated

thanks, jon
 
Make the textbox a calculated control. Try the following as the Control Source of the
textbox.

=IIf([FieldName]=0, "Awaits", [FieldName])
 
An easy way is to set the format property of that control to:

If the value is actually 0...
#.00;-#.00;"Awaits"
If there is a possibility that the field is actually Null, (not Zero), you
can use:

#.00;-#.00;"Awaits";"Not Entered"

See Access help regarding
Format + Numbers and Currency Data type
 
In addition to Wayne's suggestion you may consider:
=IIf([FieldName]=0 or [FieldName] is null, "Awaits",
[FieldName])
specially since you indicated "when this is 0 (zero) ie
not set", I think you meant no data entered which would be
null.
Have a great day.
Fons
-----Original Message-----
Make the textbox a calculated control. Try the following as the Control Source of the
textbox.

=IIf([FieldName]=0, "Awaits", [FieldName])

--
Wayne Morgan
Microsoft Access MVP


Jon said:
I have a report that show the value of a price, format general number = eg
3,500

I need, when this is 0 (zero) ie not set that the report displays "Awaits",
I'm happy with VBA but can't work this one out!!

Any help would, of course, be appreciated

thanks, jon


.
 
Perfect Wayne, thank you

Wayne Morgan said:
Make the textbox a calculated control. Try the following as the Control Source of the
textbox.

=IIf([FieldName]=0, "Awaits", [FieldName])

--
Wayne Morgan
Microsoft Access MVP


Jon said:
I have a report that show the value of a price, format general number = eg
3,500

I need, when this is 0 (zero) ie not set that the report displays "Awaits",
I'm happy with VBA but can't work this one out!!

Any help would, of course, be appreciated

thanks, jon
 
Back
Top