PDA

View Full Version : Don't want access to automatically create relationships in multi table queries



wpanssi
12-08-2008, 02:03 PM
When I create queries with multiple tables access sometimes adds relations automatically (which I don't want). For example, if I have many tables with the field called 'id' as the primary field, access creates a relationship between these id fields. Is there a way to tell access to stop this?

I have tried to look for a setting that affects this behaviour but haven't found one so far. Maybe some macro thingy could help me?

Thanks!

CreganTur
12-11-2008, 06:45 AM
Access is a relational database system. This means you have multiple tables that contain different, but related data. The tables are linked by field relationships- most likely primary key -> foreign key. This should ensure that all of the records from the queried tables are correctly matched.

If you try to query multiple tables without a relationship you're going to end up (most likely) with a cartesian product- this is when each record in one table is multiplied by all of the records in the second table. Cartesian Products are never desired because they show duplicate records that don't actually exist in either of the tables... that and they're mostly useless.

Depending on how you have your tables setup Access might be enforcing referential integrity, which is a VERY good thing.

Your request/question, as it is written, doesn't make much sense because it sounds like you're trying to do something that goes completely against the spirit of relational databases.

If I've misunderstood you, please provide a more detailed explination.