Microsoft Access Report Filter / how...?
I have 开发者_运维知识库a database to calculate my expenses. I record expenses with negative numbers, and salary with positive numbers. When I make the month report, and sum the values, it sums it all including salary. I want to code of Visual Basic to sum negative numbers only. I know about Filter property, but the Filter I put disappears when I close database. Can you help me, please?
You can build your report using a query or use the Where argument of the OpenReport method of the DoCmd object in versions of Access since 2003.
EDIT re comment
The easiest way to create a query is to use the query designer, viewed in SQL View, you should see something on the lines of:
SELECT Amount
FROM MyTable
WHERE Amount <=0
精彩评论