Results 1 to 3 of 3
  1. #1
    megatronixs is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    91

    check every 10 or 15 minutes if the records in table are not less than last time

    Hi all,



    Is there a way to check the difference of records in a table and to see if those records are not less than they where 10 or 15 minutes before?
    If I have lets say 1500 records in a table, and after 10 minutes there are 1467 records, it means I lost records (deleted).
    We only add records and we are never deleting records, but we had a few times that records where missing over 3000 and no one niticed till really late and the backup I make every few hours, had already less records and to many statuses changed.

    I was thinking there could be some code checking every 10 or 15 minutes if there is no less records than last time.

    Any one has an idea what I would need or some code examples? I did a search, but found no ideas on this.

    Greetings.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Have a log file that posts the count every 10 min.
    Run an append query to post the count.
    [table], [count], [time]

    in a form
    The form has a timerInterval (in thousands)
    and ONTIMER() event


    set the timerInterval to 1000. (this is 1 second, or set your own time interval)
    in the ONTIMER() event, this code will execute every second (in our example)


    Code:
    private mbIsRunning as boolean
    
    Private Sub Form_Timer()
    
    If you want it to fire at a particular time, then 
    If vTARGTIME = tIME() And Not mbIsRunning Then
       mbIsRunning = True
       docmd.openquery "qaAddCount"
    End If
    
    
    end sub

  3. #3
    megatronixs is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    91
    Hi ranman256,

    Thanks, I will try it out and post back when I solved it :-)

    Greetings.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 07-19-2015, 05:21 PM
  2. Replies: 4
    Last Post: 04-04-2015, 03:28 AM
  3. Replies: 4
    Last Post: 06-12-2013, 10:20 AM
  4. Replies: 1
    Last Post: 02-28-2012, 09:16 PM
  5. Replies: 3
    Last Post: 09-01-2011, 11:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums