Here is the code we have been using for months, and it has worked great. Now it's not working. The only difference i can see is the month has gone to a two digit number (from 9 to 10).
It basically pulls all closed tickets that are in the past two months. So it looks at date2 (date ticket closed in database) and grabs everything that is greater than the current month minus one. So right now we should be getting all closed tickets in September (9) and October (10), but we are only getting Septembers closed tickets.
conn.open "SELECT * FROM helpdesk WHERE Status = 'Closed' and date2 > '" & month(date) -1 & "-%" & year(date()) & "%' ORDER BY ID DESC;", "DSN=helpdesk"
This is the way the date looks in the database:
Ideas as to why this isn't working now?