Displaying Text Value in Number field in report.

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top