replacing 0 (zero) with words

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
 
W

Wayne Morgan

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

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

Fredg

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
 
F

Fons Ponsioen

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


.
 
J

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
 

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