code for copying all records from 1 table to another

capdownlondon

Registered User.
Local time
Today, 14:04
Joined
Mar 18, 2007
Messages
52
could someone please help me out with the code in can put behind a button on a form, that will copy all records from the tabe in the current recordsource and add them to another tble with the same structure.

thanks

Adam
 
Someone (like me) is bound to ask you why you want two tables with the exact same data? ;)
 
well, i actually using 1 table as like a temp table, to get aroubd another problem i am having whilst linking calendar with a subform, but i wont go into that(see other recent posts). I actually think if i write the data to another table and the cut them and add them to update the other table when i hit a button then it get round the problem that is caused when the calendar is updating the same recordsource that the subform i linked to also.

if that makes sense?

but anyway, does anybody know the code i can try for this?

thanks
 
Copy data from one table to another with the same structure:
Code:
INSERT INTO MyNewTable ( field1, field2 )
SELECT OldTable.field1, OldTable.field2
FROM OldTable;
More interesting is to know why you choose to do this. It's an odd solution to a problem.
Curious as i am, i'll check your previous posts.
 

Users who are viewing this thread

Back
Top Bottom