View Full Version : How to copy all record on a table to another existing table?


metad
02-03-2005, 03:15 PM
I have a table with employees’ information. I want to copy all records in this table to another existing table “WorkTimes”. I do not want to edit my employee table, so therefore I want to copy all records to another table before editing/adding information in other fields. How I can do that with a macro or module?

Thanks in advance.

statsman
02-03-2005, 07:18 PM
Try an update query

neileg
02-09-2005, 01:34 AM
If you need to duplicate data that is already in your data base, you have a design problem. Your data is not normalised. All you should need to use in your WorkTimes table is the employee ID.

Pat Hartman
02-09-2005, 11:09 AM
You would use an append query, not an update query. Append queries add new rows. Update queries update existing rows.

In the QBE grid, select the source table and all the fields you want to copy.
Change the query type to append and select the name of the target table.
If the column names are identical, Access will automatically populate the "append to" column name. If not, you'll need to select the "append to" column names by hand.