I need to do a DSum with criteria that picks up a previous month based on todays date, I have got the following but I don't know how to format the last part of the criteria. If I take out the Month(DateAdd("m",-13,(Date()))) and replace it with 6 it works fine.
Any ideas please...?
Code:
DSum("[invquan]","[qrySalesByStockCode]","[stcode] = '" & [stockcode] & "' and [Month] = Month(DateAdd("m",-13,(Date())))'")
Any ideas please...?
