Results 1 to 3 of 3
  1. #1
    bignate is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    47

    Question Query wont show records with a blank field

    Hi,

    I have a query by form that has the criteria Like [Forms]![FormName]![ControlName] & "*" for each field. However the problem is that if one of the records have at least one blank field then the whole record wont show up in the query results. For example if there is a record with Fullname, and Age filled in but Address isn't filled in then if search Adam into the query by form the record wont show up because the address line is blank.

    To make records that have a blank field show I know I could use Like Forms![FormName]![ControlName] & "*" Or Forms![FormName]![ControlName] Is Null but when I have used it, it has corrupted the query because I think if you use If Is Null many times in one query it becomes too complex for it to process. AlsoThe other method is to use Nz in an expression but I cant do that because I want the query results to show up in a form where you can edit the records and the error message Field is based on an expression and can not be edited comes up if you try to edit the records.



    So my question is does anyone know anything else I could put into the criteria to show records that may have a blank field?

    Thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You tried applying criteria to the Nz calced field and including the native field on form and that won't allow record edit? Works for me.

    Only alternative I can see is VBA code to construct filter string and pass the filter with WHERE argument of DoCmd.OpenForm or to set the Filter property.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bignate is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    47
    I entered the whole is null statements but into the SQL view and saved it in SQL view and that way the query doesn't corrupt.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-11-2013, 07:51 AM
  2. Subform wont show in 2007
    By Jake in forum Access
    Replies: 1
    Last Post: 07-15-2011, 02:48 PM
  3. Query to show blank entries
    By jo15765 in forum Queries
    Replies: 1
    Last Post: 12-09-2010, 08:15 AM
  4. Its Only A Poor Zero...Why wont it Show???
    By chompgator in forum Access
    Replies: 2
    Last Post: 03-08-2009, 01:54 PM
  5. All Data wont show
    By Wrangler in forum Queries
    Replies: 1
    Last Post: 01-02-2006, 03:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums