Allen - I created the Append Query and it works but it has
created its own problems.
1. I inserted the query in the Afterinsert and it works
but it stops and gives you a message that you are about to
copy files then another message how many files copied.
2. But worst then that it copies all the lines in the form
each time. If I add one new line of info to my form and
there's already 100 lines in it 101 lines gets added to my
history table.
George
-----Original Message-----
So, you want to trace *inserts* only? If the record is
changed later before
it is deleted, you don't need to know about that.
In that case, execute an Append query statement in the
AfterInsert event
procedure of your form. If you make a dummy insert query
(Append on Query
menu in Query design), you can then switch it to SQL View
(View menu) and
copy the statement you need. Then use the Execute or
RunSQL method to
actually write the record to your duplicate table.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to the newsgroup. (Email address has
spurious "_SpamTrap")
I would like each new line of info that is added to be
added to the back-up table. And when the original line
is
deleted the back-up table is untouched.
Thanks - George
-----Original Message-----
You could use the AfterUpdate event procedure of the
form
to write the
record to the other table as well.
Did you want to insert a copy of the record each time
it
is changed? Or did
you just want to keep the most recent values before it
was deleted? The
programming is not for the faint hearted, but the code
to
keep a complete
audit trail of every insert, edit, and delete is
available in this link:
http://allenbrowne.com/AppAudit.html
--
Allen Browne - Microsoft MVP. Perth, Western
Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to the newsgroup. (Email address has
spurious "_SpamTrap")
Is it possible to have the data from a form go to two
tables - one the table that created the form and
another
identical table I want to use for historical
purposes. I
would like to be able to delete the data in the form
and
still have a historical copy.
Thanks - George
.
.