Ok, I am dumbfounded by this. I had it working before but my toddler crashed my harddrive and all my programmers were not retrievable(oops no backups).
Problem: Im updating columns in a microsoft access database. After every 90 days I want to reprocess the reocords in a table. And for some reason my query statement is not pulling out/updating the correct records.
I had it working before my computer crashed but now I am trying something alittle different since I dont remember exactly what my query statement was before.
'declare varaibles
Dim myquery As String
Dim NintyDayDate As Date
'initialize variables
NintyDayDate = Date.Now.Today.AddDays(-90)
'change code to 'N' if the last email was sent
'over 90 days ago, for preprocessing
myquery = "update companyinfo set Code = 'N' where [Date] <= '" & NintyDayDate & "'"
I've tested this several times changing dates to the year 2004. but it doesnt seem to work. When I previously programmed this I did all my calculations in the query statement instead of creating a variable NinetyDayDate, but I just cant seem to make it happen.
Problem: Im updating columns in a microsoft access database. After every 90 days I want to reprocess the reocords in a table. And for some reason my query statement is not pulling out/updating the correct records.
I had it working before my computer crashed but now I am trying something alittle different since I dont remember exactly what my query statement was before.
'declare varaibles
Dim myquery As String
Dim NintyDayDate As Date
'initialize variables
NintyDayDate = Date.Now.Today.AddDays(-90)
'change code to 'N' if the last email was sent
'over 90 days ago, for preprocessing
myquery = "update companyinfo set Code = 'N' where [Date] <= '" & NintyDayDate & "'"
I've tested this several times changing dates to the year 2004. but it doesnt seem to work. When I previously programmed this I did all my calculations in the query statement instead of creating a variable NinetyDayDate, but I just cant seem to make it happen.