UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> How To Get Queries To Display Records Where Certain Fields Are Blank?, Access 2016    
 
   
Accipiter22
post Apr 7 2020, 08:48 PM
Post#1



Posts: 553
Joined: 27-September 05
From: Boston, MA


I can't figure this out for the life of me...Let's say I have...

tblSeries
SeriesID
fldSeriesNumber

tblName
NameID
fldFirstName
fldLastName

tblBrand
BrandID
fldBrand


tblCard
CardID
SeriesID (foreign Key)
NameID (foreign Key)
BrandID (foreign Key)


I have a bunch of data, and I then have a query based on tblCard that shows fldBrand, fldFirstName, fldLastName, and fldSeriesNumber. If any of the records have a blank entry for fldSeriesNumber (and also thus SeriesID) for instance, then those records don't show up in the query. Even if I try to ONLY display records with a null value, the query still returns a blank. Any ideas? I want to display all records, including those with blanks in any of the fields, and can't get this to work.

Go to the top of the page
 
vtd
post Apr 8 2020, 01:13 AM
Post#2


Retired Moderator
Posts: 19,777
Joined: 14-July 05
From: Sydney NSW Australia


You need to use the LEFT (OUTER) JOIN between Table [tblCard] and Table [tblSeries]. The SQL of the Query should be something like:

CODE
SELECT ...
FROM [tblCard] LEFT JOIN [tblSeries]
  ON [tblCard].[SeriesID] = [tblSeries].[SeriesID]  ...
Go to the top of the page
 
Accipiter22
post Apr 8 2020, 09:21 AM
Post#3



Posts: 553
Joined: 27-September 05
From: Boston, MA


Thank you, that was driving me nuts
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    25th May 2020 - 09:56 PM