Solved

Access query does not display records with empty fields - Can you help please

Posted on 2014-11-08
4
372 Views
Last Modified: 2014-11-10
I have a query that gets its criteria values from a form.
I have cleared the form so there are no filters/constraints. That means Combo405 and Combo406 "below" are empty (set equal to "").
However when any field in the table is empty, that record does not show up in the query.
For instance i have two records with the same [Property] value, but one does not have a value in the [Owner] field. Then my query only displays the record that has a property value and a Owner value in the underlying table.

My query looks like below.


View of query
0
Comment
Question by:Fritz Paul
  • 2
  • 2
4 Comments
 
LVL 33

Expert Comment

by:Mike Eghtebas
Comment Utility
use NZ(MyField) for those fields

TheOwner: Nz( [Owner])     '<-- this inserts empty string for the missing owners.

or

TheOwner: Nz( [Owner],"tbd")
0
 

Author Comment

by:Fritz Paul
Comment Utility
Hi,

My database design view now looks like below. The query now includes even those records without values. Thanks.

But now the query is not updatable anymore, because I changed all the names adding an X after the name. If I keep the query field names the same I get a circular reference error.

Is there a way that I can still keep the query updatable?

Please what do you mean by the "tbd"?

New query design view.
0
 
LVL 33

Accepted Solution

by:
Mike Eghtebas earned 500 total points
Comment Utility
re:> Please what do you mean by the "tbd"?

Stands for "to be determined" if missing.
------
re:> Is there a way that I can still keep the query updatable?

Can't you add an "X" at the end of your Control Source properties for the affected text boxes.
----------------
As a last resort, remove the existing NZ() but change the criteria:

Like "*" & [Forms]![frmTasksSelect]![Combo405] or Nz([Forms]![frmTasksSelect]![Combo405]."")=""

same for the other one. Check for typos.

Mike
0
 

Author Closing Comment

by:Fritz Paul
Comment Utility
Thanks a lot.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now