I have the following situation:
I imported a text file into an Access table. the internal table I linked
to another table by primary key. the second table is the same key
of the first.
every thing is perfect (the two table work nice).
Now the problem,that I built a form to see the data from the two table,
the primary and the secondary. the form displayed only the records that
the primary keys are equal (this is normally by the relation ship).
My question: How I can display all the records from the primary table
eventhough they don't have corresponding values in the other table.
YOu need to change the join between the two tables. By default, Access creates what is called an equi-join (you know this because in the QBE screen, the two tables are connected by a single line with no arrows on either end).
You need to change the join. To do so,
1) Open up your query in design view.
2) Double-click the line between your two tables (this can be tricky. You know you've done it right when a dialog box pops up with the Title "Join Properties".
3) Look at the radio button options in the bottom half of the dialog box. The first is the default - join the tables when the fields are equal. You want one of the other two: "include ALL records from TableA and only those records from TableB where the joined fields are equal" or "Include ALL records from TableB and only those records from TableA where the joined fields are equal"
4) Choose either number 2 or 3, making certain to choose the one that lists the table first where you want ALL the records to show.
5) Press OK and you're set.
You'll know you've done it right because the line between the two tables changes to have an arrow-head at the end pointing at the table where there may or may not be related records.