Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Report Filtering at Report Level via VBA

Status
Not open for further replies.

vree

IS-IT--Management
Dec 31, 2002
49
US
I have an aggregate query that is running a report.
Access 2000
WinXP Pro

I have these fields in my report:
registrationfee
paymentamount

I want to total the registrationfees which i did like this:
=Sum([RegistrationFee])
I want to total the paymentamounts which I did like this:
=Sum(Nz([SumOfPaymentAmount],0))

I then want a TotalBalanceDue which I did like this:
=Sum(Nz([SumOfPaymentAmount]-[RegistrationFee],0))

However, the TotalBalanceDue field shows all balances including zero (or paid) and I would like to know if I can use VBA to filter the TotalBalanceDue field for <>0 at the Report level.
If so, How?
Thanks
Victoria
 


Right click in the TotalBalanceDue textbox on the report and then under the data tab, add in the control source:

Code:
=[SumOfPaymentAmount]-[RegistrationFee]

&quot;No opera plot can be sensible, for in sensible situations people do not sing.&quot; - W H Auden
 
? That will not &quot;filter&quot; out the zero balances. Or am I missing something? I want to filter so that all that is returned is a nonzero balance, either people I need to bill(>0), or people I need to refund (<0).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top