Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Unanswered: Blank filter criteria for Form

    I want to filter my form for records without any data.

    When I use the following code:

    Forms!frm_DesktopOrders.Filter = "[LastName] = ''"

    It doesn't display any records, while I know that there are records with no data in that field.

    Any help would be appreciated! Thanks

  2. #2
    Join Date
    Nov 2004
    Posts
    9
    Quote Originally Posted by DoubleDownAgain
    I want to filter my form for records without any data.

    When I use the following code:

    Forms!frm_DesktopOrders.Filter = "[LastName] = ''"

    It doesn't display any records, while I know that there are records with no data in that field.

    Any help would be appreciated! Thanks
    Try putting = Null instead of = ''

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    Thanks, but it still isn't showing any records. Anything else I can try?

  4. #4
    Join Date
    Nov 2004
    Posts
    9
    Does it give you a error message or anything?

  5. #5
    Join Date
    Nov 2004
    Posts
    3
    Nope, just doesn't display any records.... It just shows the form header.

  6. #6
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Hi DoubleDownAgain,

    Try creating a Query and then for the field in question, in the criteria cell just place Is Null That being with a Space between Is and Null. Run that Query and it will give you results of all records without anything in that field. OR do it in SQL like this:

    Code:
    SELECT tblDateGrabber.PurchaseDate, tblDateGrabber.ToolNumber, tblDateGrabber.ToolName
    FROM tblDateGrabber
    WHERE (((tblDateGrabber.ToolName) Is Null));
    Gives you the same results as using the above in QBE DesignView.
    Hope this helps you. If not, paste a sample of your database and I will fix it for you.

    BUD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •