I've been stuck on one small item for awhile and it's driviing me nuts. In short, I want to run a delete query in VBA to delete records containing a billing month that's greater that a precalculated current month. The source data from another system has the dates in text format, shown as (YYYY/MM).
Here's the statement:
mySQL = "DELETE * FROM [tblBillingData]" _
& "WHERE (((tblBillingData.[Billing Month]) > #" & PreCalcCurrentMonth & "#, ));"
When it runs, it deletes everything from the table, not just the items where the billing month is greater than the current month.
All variables are declared properly and I can see the PreCalcCurrentMonth when I step through the codeAny suggestions?
Should I be evaluating each recordset individually?