[mso] Re: Access 2002 Doesn't Link Null Data

Can I assume that the null fields will be a match in the two tables?  I.e. 
if the first name is omitted in one, it is also omitted in the other?

If so, then Access will handle an inner join with "OR" in the selection and 
you can also check for "Is Null" without trouble.

However, you need to do it in SQL mode - it can't be done in design mode.

For instance:

SELECT master.title, master.first, master.last, slave.title, slave.first, 
slave.last
FROM master INNER JOIN slave ON ((master.first = slave.first) or 
(master.first is null and slave.first is null)) AND (master.last = 
slave.last) AND (master.title = slave.title);

This one is coping with missing first names in both records.  You could 
easily do the same with title too.

Regards, Dave S

PS  Access 2003 here, but it should work with 2002 as well.

----- Original Message ----- 
From: "Ray Shapp" <ras45@xxxxxxxxxxxxx>
To: <mso@xxxxxxxxxxxxx>
Sent: Friday, November 16, 2007 10:13 AM
Subject: [mso] Access 2002 Doesn't Link Null Data


> To All,
>
> A query in Access 2002 is not selecting all relevant records because some
> records have no data in one of the linked fields.
>
> I am building a new query using an existing query and a master data table. 
> The
> existing query (called Active Members) does correctly select all the 
> records
> from the master table for people who are still active members of our club. 
> The
> new query should select a subset of active members who have expressed an
> interest in a particular subject. Both the master table and the Active 
> Members
> query contain fields for Title, Last_Name, and First_Name. Only the master
> table contains info about the members' interests.
>
> When I build the new query linking Title, Last_Name, and First_Name, a few
> records are not selected because we don't have Title info such as "Mr." or
> "Mrs." for every person. Is there a way link the Active Members query with 
> the
> master table for all members who meet the other criteria even if Title 
> info is
> blank?
>
> This same problem comes up in those instances where an active member has
> neglected to supply his or her first name. Only ten or a dozen records are
> affected out of a master table containing over a thousand people.
>
> Thank you for your help.
>
> Ray Shapp
>
>
> *************************************************************
> You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
> MicrosoftOffice@xxxxxxxxxxxxxxxx
>
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
>
> To Unsubscribe from this group, visit the group's homepage and use the 
> dropdown menu at the top.  This will allow you to unsubscribe your email 
> address or change your email settings to digest or vacation (no mail).
> http://www.freelists.org/webpage/mso
>
> To be able to share files with the group, you must join our Yahoo sister 
> group.  This group will not allow for posting of emails, but will allow 
> you to join and share problem files, templates, etc.: 
> http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for 
> FILE SHARING ONLY.
>
> If you are using Outlook and you see a lot of unnecessary code in your 
> email messages, read these instructions that explain why and how to fix 
> it:
> http://personal-computer-tutor.com/abc3/v28/greg28.htm
> ************************************************************* 

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: