Counter Reset

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
 
R

Rick Brandt

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()")
 
K

Kay

Has anyone any idea how to reset it on a weekly basis so that it resets
to 0 every Monday morning
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top