I am trying to use a string filter in the criteria in the query, but I can't seem to get the if statement to work correctly, any ideas would be great on what I could try next?
The [PortfolioName] in the report [Rtest] is an invisible text box on the report, the value is selected by a choice on a form. If I put “Like [Reports]![Rtest]![PortfolioName]” in the criteria in the query it works to select the company. But I want to select Enterprise and include all of the companies. (CompA, CompB, CompC)
Here is what I wrote and it is not working.
If (Like [Reports]![Rtest]![PortfolioName] = "Enterprise") then In("CompA","CompB","CompC") Else Like ([Reports]![RSTtest]![PortfolioName]) End If
Thanks,
Darkhat
The [PortfolioName] in the report [Rtest] is an invisible text box on the report, the value is selected by a choice on a form. If I put “Like [Reports]![Rtest]![PortfolioName]” in the criteria in the query it works to select the company. But I want to select Enterprise and include all of the companies. (CompA, CompB, CompC)
Here is what I wrote and it is not working.
If (Like [Reports]![Rtest]![PortfolioName] = "Enterprise") then In("CompA","CompB","CompC") Else Like ([Reports]![RSTtest]![PortfolioName]) End If
Thanks,
Darkhat