Results 1 to 4 of 4
  1. #1
    jcollins is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    2

    How do I detect new records.

    I have written a batch script to open a particular access db once a day.

    The database accepts input from a webform.



    I would like to have access automatically determine if any records have been added to a table since the last time it was opened and, if so send emails to particular addresses containing information from the new records.

    Right now I am stuck on how to automatically detect the new records.

    Any help is greatly appreaciated.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    what's your best guess on how to do it? There's countless ways.

  3. #3
    jcollins is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    2
    Quote Originally Posted by ajetrumpet View Post
    what's your best guess on how to do it? There's countless ways.
    Well I was thinking that I would write a script that would select the ID number of the newest record (not sure how to do that) compare that to a list of the ID's of records that had already been processed. If the ID wasn't in the list then, then it would be processed (meaning selected fields would go into an email to a particular user). Then the script would go to the next newest ID and compare it to the already processed ID list. The same logic would apply. This would loop until an ID that was processed was found and then the script would shut access down.

    Somewhere in there the new ID's would be added to the "already processed" list.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by jcollins View Post
    Well I was thinking that I would write a script that would select the ID number of the newest record (not sure how to do that) compare that to a list of the ID's of records that had already been processed. If the ID wasn't in the list then, then it would be processed (meaning selected fields would go into an email to a particular user). Then the script would go to the next newest ID and compare it to the already processed ID list. The same logic would apply. This would loop until an ID that was processed was found and then the script would shut access down.

    Somewhere in there the new ID's would be added to the "already processed" list.
    that could work, but you have to figure out "how" you know that the records have been processed. that's the variable here.

    what is the indicator? field? or something else?

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

Similar Threads

  1. Replies: 10
    Last Post: 01-10-2011, 07:52 PM
  2. Replies: 7
    Last Post: 10-20-2010, 04:08 PM
  3. Replies: 3
    Last Post: 03-25-2010, 12:31 PM
  4. Detect if a row is deleted from a table in the database
    By Hameed Madwar in forum Programming
    Replies: 0
    Last Post: 01-08-2009, 07:31 AM

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