Relationships or queries?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that is based on a query which is derived from Table 1 and
Table 2. Alternatively, I could establish a relationship between Table 1 and
Table 2 and base the form on that relationship.

What's the difference? Are there advantages of one over the other?
 
The relationship defines how the database engine should manage the data,
e.g. Referential Integrity and the 2 options: Cascade Update and Cascade
Delete.

In a Query, the join between the 2 Source Tables specify how the records
should be selected and how the rows in the return dataset should be
compiled, i.e. how to match each record from Table1 to the records in Table2
to "create" a row with data from the matched records in the returned
dataset.

Sorry but you don't base the Form on the relationship as you wrote. You use
a Query / SQL String using 1 Table or combining 2 or more Tables as the
RecordSource for your Form. When you use the Form Wizard to create a Form,
the Wizard creates the SQL String for you if you want data from 2 or more
Tables.
 

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

Back
Top