Not Null and ApplyFilter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Smith

    #1

    Not Null and ApplyFilter

    The following code will not work for filtering records on a form:

    DoCmd.ApplyFilt er , "Award =" & Not Null

    I use the following line to filter for a series of Yes/No boxes without
    trouble:

    DoCmd.ApplyFilt er , "AttributeNativ e =" & True

    If helpful, the field [Award] is a number field where a 4 digit year is
    stored on some records.


  • Randy Harris

    #2
    Re: Not Null and ApplyFilter

    * John Smith:
    The following code will not work for filtering records on a form:
    >
    DoCmd.ApplyFilt er , "Award =" & Not Null
    >
    I use the following line to filter for a series of Yes/No boxes without
    trouble:
    >
    DoCmd.ApplyFilt er , "AttributeNativ e =" & True
    >
    If helpful, the field [Award] is a number field where a 4 digit year is
    stored on some records.
    >
    >
    Null is never "=" to anything. Ever.

    Use "Award Is Not Null"

    --
    Randy Harris
    tech at promail dot com
    I'm pretty sure I know everything that I can remember.

    Comment

    • John Smith

      #3
      Re: Not Null and ApplyFilter

      Got it, Never Ever! New code works great and makes sence...ever!

      Thanks.
      Null is never "=" to anything. Ever.
      >
      Use "Award Is Not Null"
      >
      --
      Randy Harris
      tech at promail dot com
      I'm pretty sure I know everything that I can remember.

      Comment

      Working...