Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Unanswered: Filtering on records with NULL fields with VBA - help!

    I'm trying to filter a form based on an established query.

    The filter should force only records without data in a particular field to be visible if a checkbox on the originating form is checked:

    if forms!launchform!OnlyWithoutContracts = -1 then
    filtertext = "SupportContractExpiry = NULL"
    Me.Filter = filtertext
    Me.FilterOn = True
    end if

    This just does not work.

    Sample of Query results:

    Expiry______Name______Coverage___SCExpiry
    1/31/2005__HJFS3______5x8________2/27/2004
    1/1/2006___HJFS52_____5x8________

    So, I want to only see the second record.

    Any advice?

    x_2

  2. #2
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Not =Null it should be 'Is Null'.

    Try :

    filtertext = "[SupportContractExpiry] Is Null"

  3. #3
    Join Date
    Mar 2004
    Posts
    2
    Shazam!

    That did it. Thank you very much!!

    x_2

    Originally posted by DCKunkle
    Not =Null it should be 'Is Null'.

    Try :

    filtertext = "[SupportContractExpiry] Is Null"

Posting Permissions

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