Today's new records in Append Query

tscotti

Registered User.
Local time
Today, 12:21
Joined
Aug 15, 2004
Messages
47
Hello All,

I'm trying to create an Append Query that automatically executes after the closing of a form. However, I just want to append today's records and not all the form's records every time it is closed. So, I thought about using a DATE function inside an Append query to compare all the form's records with today's records. Am I on the right track? If so, how to go about it?
Thank you all very much for any responses.

Tony
Montreal
 
Controlling batch appends this way is problematic since a form can be closed many times a day by many users in a multi-user environment. To begin with, why are you copying the records? If you are trying to create an audit table, you also need to consider change and delete activity. Search the archives for suggestions on audit trails.

If you determine that all you want to do is to copy new records as they are added, use the BeforeUpdate event of the form and use DAO or ADO to "copy" the current record before it is actually inserted into the primary table. If you examine Me.NewRecord, you can determine if the present record is new, in which case you want to copy it, or old, in which case you don't.
 

Users who are viewing this thread

Back
Top Bottom