![]() |
|||||
|
M.A.R.S |
||||
|
This forum is for the sole use of MARS users. ChristianSteven Software will not accept any responsibility for the contents.
|
||
| Return to Website | ||
| Viewing Page 1 of 1 (Total Posts: 2) |
| Author | Comment |
Peter Bielawski
Dec 11, 06 - 10:07 PM |
Last months transactions
My Access database is part of our fuel system. It collects transaction information and reports are based on these transactions. I have a report whose control source is a query. The query uses the following criteria to filter out transactions for the previous month. Between ((Month$(Date$())-1) & "/01/" & Right$(Year$(Date$()),2)) And ((DateAdd$("m",1,(Month$(Date$())-1) & "/01/" & Right$(Year$(Date$()),2))-1)) The report works fine while in the database, I get last months transactions. But from MARS I get this months transactions. MARS is filtering out this months transactions, not last months. |
|
Janet Almeda
Dec 12th, 2006 - 8:22 AM |
I am surprised your report works at all. If I run your query in Access: SELECT ((Month$(Date$())-1) & "/01/" & Right$(Year$(Date$()),2)), ((DateAdd$("m",1,(Month$(Date$())-1) & "/01/" & Right$(Year$(Date$()),2))-1)) I get the results: 11/01/06, 10/02/06 As you can see, this would filter data from October not November. You need to adjust your query so that it returns the correct dates then it should work correctly in MARS too.
|