Transfer info from one table to another

G

Guest

How would I make a button that would transfer several records from one table
to another table that is identical (except for the information in it) when
the user clicks a button?

One of the tables will have only one record and I could do an insert
statement like:
INSERT INTO OldARMembers(MemberNumber, ...)
VALUES (me.membernumber, ...);
but this would be annoying if I ever make updates

The other table will have several records and that would need to be
transefered. They would all have the same membernumber.
 
A

Allen Browne

dan, what is the purpose of this transfer?

If you are archiving records that should then be removed from the original
table, see:
Archive: Move records to another table
at:
http://allenbrowne.com/ser-37.html

If you are selecting a subset of the records that still remain in the
original table and need to remain in sync, just copy the primary key value
over in your INSERT query statement. An inner join query will then give you
all the other fields in their current state without having to worry about
keeping 2 copies of the data up to date. (The subset table could be related
to the original with a cascading delete so that any records deleted from the
original are deleted from the subset as well, or the inner join would give
you the same effect anyway.)
 

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