how do I not show a record in a report when the total is zero?

L

Lonewolf

I have a very simple DB where I track items. I have an ID, Description,
Intake #, Sold #, Remaining # (this is from subtracting the sold from the
intake), and a total inventory (this is calculated using Dsum on remaining
inventory based on description matches).

I have a report that I wish will show all records that have a remaining
balance, and just exclude the ones that have a zero balance.

I tried:
Private Sub Report_Load()

If Remaining.Value <= 0 Then
ID.Visible = False
Description.Visible = False
Intake.Visible = False
Sold.Visible = False
Remaining.Visible = False
Total_Inventory.Visible = False
End If

End Sub

But it does not work.. Please help!!!
 
A

Armen Stein

I have a report that I wish will show all records that have a remaining
balance, and just exclude the ones that have a zero balance.

Remove the code you showed - you're on the wrong track there.

Make your report based on a query. In that query, specify criteria
that give you the records you want to include on your report.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 

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