B
BFish via AccessMonster.com
I have this VBA to run an update query on the 1st of the month;
If day(Date) = 1 Then
CurrentDb.Execute "qupdBusinessCode", dbFailOnError
End If
It will only execute on the next day (the 2nd). Just to check If I had the
right syntax I ran {day(Date) = 1} in the intermediate window and it will
only return true when it's the 1st of the month. If I change the statement
to {day(Date) = 2} then the function will execute on the 3rd day of the month.
I have looked and relooked at my update query (it works fine when manually
running) for any date reference that would cause this to occur, there is no
date reference or even a datefield in it or the totals query it is based off.
I am quite at a lost here on what seems should be a very simple matter. Why
is this executing a day after intended?
Thanks,
Bill Fischer
If day(Date) = 1 Then
CurrentDb.Execute "qupdBusinessCode", dbFailOnError
End If
It will only execute on the next day (the 2nd). Just to check If I had the
right syntax I ran {day(Date) = 1} in the intermediate window and it will
only return true when it's the 1st of the month. If I change the statement
to {day(Date) = 2} then the function will execute on the 3rd day of the month.
I have looked and relooked at my update query (it works fine when manually
running) for any date reference that would cause this to occur, there is no
date reference or even a datefield in it or the totals query it is based off.
I am quite at a lost here on what seems should be a very simple matter. Why
is this executing a day after intended?
Thanks,
Bill Fischer