IIF statement as criteria

  • Thread starter Thread starter rrt4703
  • Start date Start date
R

rrt4703

I am trying to write a query that filters out all February 29th from a
set of start and stop dates passed to the query from a form. There is
also a check box to include or exclude the February 29th from the
query. This is what I have so far.

IIf([forms]![frm_individual_member]![check26]=True,Not 229,"*")

I just cant get it to pass the info into the criteria. Any help would
be greatly appreciated.

Thanks
 
You cannot change the comparison being done in a query through an IIf
statement.

You need to write something like:

WHERE Format([TheDateField], "mmdd") = "0229"
AND Nz(Forms![frm_individual_member]![check26], False) = True
 
You cannot change the comparison being done in a query through an IIf
statement.

You need to write something like:

WHERE Format([TheDateField], "mmdd") = "0229"
AND Nz(Forms![frm_individual_member]![check26], False) = True

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no private e-mails, please)


I am trying to write a query that filters out all February 29th from a
set of start and stop dates passed to the query from a form.  There is
also a check box to include or exclude the February 29th from the
query.  This is what I have so far.
IIf([forms]![frm_individual_member]![check26]=True,Not 229,"*")
I just cant get it to pass the info into the criteria.  Any help would
be greatly appreciated.

Thanks it worked great. I can see I still have a lot to learn about
ACESS.
 
Back
Top