Results 1 to 4 of 4
  1. #1
    crimedog is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2013
    Posts
    141

    Continuous form Count in the header Null records Blanks out count not 0 (I used Nz)

    Continuous form based on a query.
    In the header I have some Count functions (which work correctly) and some texts with DCount counting a separate table - these also work.
    I have some combo boxes that filter the query - these work


    when I choose an option that cause the query to be NULL - thus the records on the form are NUll

    The text boxes with:
    Code:
    =Nz(Sum(IIf(IsNull([FulfillNumber]),0,1)),0)
    go blank - I have also have
    Code:
    =Nz(Count(IIf(IsNull([SalesOrder]) And [ApprovedByPaas]=False,1)),0)
    AND the text boxes with DCOUNT (which should be unaffected by the Combo Boxes) go Blank

    Obviously something is screwy - but I don't see it

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I think you're running into this:

    http://allenbrowne.com/casu-20.html

    By the way, the records on the form aren't Null, there are no records. This would work if a subform:

    http://www.theaccessweb.com/forms/frm0022.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    crimedog is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2013
    Posts
    141
    Exactly the case - My form is returning no records because of filter & is read only because it is the result of a Union query - I will take the suggestion and add the Message box.

    Thanks - It is good to know the cause.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 08-17-2017, 12:44 PM
  2. Query count formula not counting blanks
    By randolphoralph in forum Queries
    Replies: 2
    Last Post: 09-21-2015, 02:39 PM
  3. Count Records in Header
    By crimedog in forum Forms
    Replies: 1
    Last Post: 03-17-2015, 07:51 PM
  4. Show Blanks in count as 0
    By WickidWe in forum Queries
    Replies: 2
    Last Post: 12-11-2013, 01:37 PM
  5. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM

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