Link to home
Start Free TrialLog in
Avatar of J.R. Sitman
J.R. SitmanFlag for United States of America

asked on

Microsoft Access Query help

How do I add "and availability is not null" to the bold line below

strFormCrit = Nz(Me.OpenArgs, "1")
    strCritBase = strFormCrit & " AND ImpoundCode IN('OCS', 'OCST','ACOS','ACOST')"
    strCritWithID = strCritBase & " AND  Availability > (ImpoundDate +7)"
    strCritNoID = strCritBase & " AND  Availability <= (ImpoundDate +7)"
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

strCritWithID = strCritBase & " AND  Availability Is not  Null AND  Availability > (ImpoundDate +7)"


or


strCritWithID = strCritBase & "   AND  Nz([Availability],#1/1/1900#) > (ImpoundDate +7)"
Avatar of J.R. Sitman

ASKER

My mistake,

What I need is "Give me all the animals where the Availability date is greater than 7 days past the impound date and also include those where the Availability date is null.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Getting an error.  See attached
error1.png
error2.png
Never mind. It was missing the end )

Working
Thanks