Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-08
4
Medium Priority
?
583 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 40430528
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
ID: 40432077
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 34

Accepted Solution

by:
Mike Eghtebas earned 2000 total points
ID: 40432485
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
ID: 40432591
Thanks a lot.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 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