If statement

libby32

Registered User.
Local time
Today, 20:33
Joined
Mar 6, 2003
Messages
42
Hi, I have a calculated value based on a subform and form displayed on my main form. When this value calculates to 0, I don't want this record to show. Only the records with a remaining inventory (that is a value greater than 0)should show. How can I only show the records on my form with a value greater than 0??? I'm a beginner so sample code and where I should put it would be great help.

TIA
 
Try something like this assuming your inventory field is named "Inventory".

This would be placed in your event procedure.

If Inventory >0 then Inventory.Visible=True else Inventory.Visible=False
 
Thanks, but I tried this already, then I realized this will only make the field invisible. I want the whole record not to show up..Any other suggestions??
 
Why not just put >0 in the underlying query criteria? or use the Apply Filter method
 
thanks, I already tried this as well. The calculation is done on the form based on a sum of records in the subform...
 

Users who are viewing this thread

Back
Top Bottom