Counter Reset

  • Thread starter Thread starter Kay
  • Start date Start date
K

Kay

Hi
I have used a counter on my form that displays the total number of
record in my table. I put a label in my form and used it to show the
count. I have used the following code in the OnTimer() event:

Me!label59.Caption = DCount("*", "Current Jobs")


Has anyone any ideas how I can get the counter to reset to zero at the
start of every day or better still at 6am every morning so that the
counter only shows total records saved during that day.


Any help is much appreciated
 
Kay said:
Hi
I have used a counter on my form that displays the total number of
record in my table. I put a label in my form and used it to show the
count. I have used the following code in the OnTimer() event:

Me!label59.Caption = DCount("*", "Current Jobs")


Has anyone any ideas how I can get the counter to reset to zero at the
start of every day or better still at 6am every morning so that the
counter only shows total records saved during that day.


Any help is much appreciated

If your table includes a DateSaved field with date only (no time) then...

Me!label59.Caption = DCount("*", "Current Jobs", "DateSaved = Date()")
 
Has anyone any idea how to reset it on a weekly basis so that it resets
to 0 every Monday morning
 
Back
Top