value in a control

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

Guest

I currently have a query that has a Sum field. On the form I would like to show only results 0 or higher. i.e. if the sum of the values is negative, I want to show 0 on the form. Can this be done?
i.e. calculation is OnOrder = OrderQty - RecdQty. If they happen to receive more then ordered (can happen) I don't want OnOrder to show negative number, OnOrder is 0 cecause they've recieved all that was ordered (but plus some in some cases).

Can I do this? I can't seem to figure it out

Thank you in advance
Shawna
 
I currently have a query that has a Sum field. On the form I would like to show only results 0 or higher. i.e. if the sum of the values is negative, I want to show 0 on the form. Can this be done?
i.e. calculation is OnOrder = OrderQty - RecdQty. If they happen to receive more then ordered (can happen) I don't want OnOrder to show negative number, OnOrder is 0 cecause they've recieved all that was ordered (but plus some in some cases).

Can I do this? I can't seem to figure it out

Thank you in advance
Shawna

Shawna,
Here are a couple of different ways to do this.
On the Form....

1) Set the Format Property of the control to:
#;0;0
See Access Help on
Format + Number and Currency datatype

2)
Use an unbound control.
Set it's Control Source to:
=IIf([YourField]>0,[YourField],0)
 
Back
Top