Really basic(?) Query query!

G

Guy Fletcher

I am running a MS query, driven by file A.

It lists out fields from file A, but I want it to also list one field
from the (linked) file B.

However, it only lists records where A's key matches B's key. It is
ignoring records on A which don't have a corresponding record on B
(which is a legitimate possibility).

How do I get such records to be included in the results, even if the B
field ends up says "N/A" or "not found" or whatever? Is there any way
of declaring B as "optional" (so to speak)?

Thanks
Guy
 
J

John W. Vinson

I am running a MS query, driven by file A.

It lists out fields from file A, but I want it to also list one field
from the (linked) file B.

However, it only lists records where A's key matches B's key. It is
ignoring records on A which don't have a corresponding record on B
(which is a legitimate possibility).

How do I get such records to be included in the results, even if the B
field ends up says "N/A" or "not found" or whatever? Is there any way
of declaring B as "optional" (so to speak)?

Thanks
Guy

This is called an "Outer Join" and it's a standard feature of queries.

Select the join line in the query design window and view its Properties.
Select option 2 (or 3): "Show all records in A and matching records in B".
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

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