K
KPR
Hi,
I can't seem to find the right syntax for my IIf statement that I have in a
Query Parameter. I have a [frm_MyForm] with a tickbox. If the tickbox isn't
checked I want to pull records where a CatID = 1. If the tickbox is ticked I
want to pull records where CatID = 2 Or 3. Here is my Criteria Statement in
the [CatID] column in my query that I can't get to work...
IIf([Forms]![frm_MyForm]![my_Tickbox]=-1,([tbl_MyTable].[CatID])=2 Or
([tbl_MyTable].[CatID])=3,1)
I can't get any records returned if the tickbox is checked, if the tickbox
isn't checked I'm returning the proper records.
Thanks,
Ken
I can't seem to find the right syntax for my IIf statement that I have in a
Query Parameter. I have a [frm_MyForm] with a tickbox. If the tickbox isn't
checked I want to pull records where a CatID = 1. If the tickbox is ticked I
want to pull records where CatID = 2 Or 3. Here is my Criteria Statement in
the [CatID] column in my query that I can't get to work...
IIf([Forms]![frm_MyForm]![my_Tickbox]=-1,([tbl_MyTable].[CatID])=2 Or
([tbl_MyTable].[CatID])=3,1)
I can't get any records returned if the tickbox is checked, if the tickbox
isn't checked I'm returning the proper records.
Thanks,
Ken