Linking tables in Access

C

cipher

How can I link two tables within Access so that records entered into one are
automatically entered into the other?
 
R

Rick Brandt

cipher said:
How can I link two tables within Access so that records entered into one are
automatically entered into the other?

You can't. That's not how related table work. A relationship can cascade the
update of a field with a unique index to a related field in another table or
cascade the deletion of a parent record related to a child table, but
relationships will not create records in related tables.

If you use a database engine that supports triggers (Oracle, SQL Server, etc.),
you could create an insert trigger that would do this, but even then it would be
a highly unusual practice.
 
A

Armen Stein

You can't. That's not how related table work. A relationship can cascade the
update of a field with a unique index to a related field in another table or
cascade the deletion of a parent record related to a child table, but
relationships will not create records in related tables.

If you use a database engine that supports triggers (Oracle, SQL Server, etc.),
you could create an insert trigger that would do this, but even then it would be
a highly unusual practice.

Yes, highly unusual and most often a poor design. When you want
information to "show up" in another place automatically, you should use
a query that returns records with certain criteria. Then you can use a
status field or something similar to have records appear in that query
at the right time, even though their data is stored in only one original
table.

If you need to have the fields presented with related information from
other tables, use queries to join them together.

Hope this helps,

--
Armen Stein
Access 2003 VBA Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0764559036/jstreettech-20
J Street Technology, Inc.
Armen _@_ JStreetTech _._ com
 
J

Jeff Boyce

In keeping with the theme of the responses you've already received, "why?"
As in "what business need are you attempting to solve by having two copies
of the same record in your Access database?"
 

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