Displaying Text Value in Number field in report.

G

Guest

I need to display text value in number field in order reports for some items
where quantity isn't applicable. For those items, I would like the report
displays "N/A" instead of number which is bounded to quantity (number field)
in order table.

In report, I would like have some print out as following:

Qty Order Item Extended Price

1 Item A $50

3 Item C $100

N/A Service A $200


Is there any way to display N/A in quantity field in report live above as
well as form view?

I may remedy this problem by changing the quantity field from number to
text, but I would like to know if I can do this without changing field
property.


Thank you very much for your help.
 
J

Jeff Boyce

Don't confuse the underlying data field in your table with the control that
displays something in your report.

You can modify the control's ControlSource property to something like:

=IIF(Nz([YourField],0)=0,"N/A",[YourField])

This checks to see if [YourField] is 0 or null, then displays "N/A";
otherwise, it displays the value in [YourField].

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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