how do I add data from one table to another table?

R

rphen

I have created a database in Access 2007 that contains two main tables along
with several look-up tables. Both tables for the most part have common
fields. I want to add data to Table 1 and have it added to Table 2 without
having to manually add the same data. I also would like to add data to Table
2, but not have the same data going to Table 1. I plan on using a Form to
add the data. I am sure that the answer is staring me right in the face, but
for now I am not seeing it. Any help would be appreciated. Thanks.
 
J

Jeff Boyce

Hmmm...?

In a well-normalized relational database, you would not have two tables that
"for the most part have common fields". That sounds more like a
spreadsheet.

If you'll describe a bit more what having the data in both tables would
allow you to do, folks here may be able to offer alternate approaches.

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

John W. Vinson

I have created a database in Access 2007 that contains two main tables along
with several look-up tables. Both tables for the most part have common
fields. I want to add data to Table 1 and have it added to Table 2 without
having to manually add the same data. I also would like to add data to Table
2, but not have the same data going to Table 1. I plan on using a Form to
add the data. I am sure that the answer is staring me right in the face, but
for now I am not seeing it. Any help would be appreciated. Thanks.

Well... the answer is almost surely DON'T DO IT.

The whole *point* of the relational database paradigm is to avoid redundancy,
which is good because it avoids redundancy.

Why do you feel that you need to store *the same data* in two different
places? This only opens the door to data validity errors, since you cannot
prevent the data from being edited in one table and not in the other, giving
you discrepancies.

What is the rationale? Why would you not instead just have a relationship
between the two tables, with a link from Table2 to Table1 so that you can use
a Query joining the two tables to see the common data?

Perhaps you have a good reason to do this, but if so please clarify.
 
L

Laura

I import data from temporary tables to my linked tables. You can import one
table's contents into another. Simply copy your database, open your original
database, then right-click and select "import" - choose your copy and pick
the table you wish to import. BACK UP YOUR DATABASE FIRST - JUST IN CASE YOU
DECIDE THIS ISN"T WHAT YOU WANTED TO DO (Trust me - I learned the hard
way)...Good Luck
 
J

Jeff Boyce

Laura

In the context of the original post, "can" <> "should".

There's a chance that the user is trying to duplicate data (same data in
multiple tables). If so, even though it is possible to do, it isn't a very
good use of the tool.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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