criteria to query from form

dosia

Registered User.
Local time
Today, 15:25
Joined
Jan 29, 2014
Messages
15
May be I should rephrase my issue

I have a query that i need to run from a form. From form I need to pass criteria
1 for canada
2 for us
1 and 2 for us and Canada

The criteria needs to go into field Pricing Type. If user selects 1 then only Pricing Type 1 will display. If user selects 2 than only Pricing Type 2 should display. I user selects both , Pricing Type 1 and 2 should be listed.

Can this be achieved with option group? Please any help appreciated.
 
You need an IN condition in your parameter query e.g.

Select <fields> from <table> where [Pricing Type] IN pRequiredTypes

then set up pRequiredTypes containing either (1), (2) or (1,2)
 
I am using this code in criteria, what is wrong it's not taking 1 and 2 if the Value from option box is 3.

IIf([Forms]![FrmUserSelection]![PricingType]=3,([dbo_AGPricingDiscounts]![PricingType] In (([dbo_AGPricingDiscounts].[PricingType])=1 Or ([dbo_AGPricingDiscounts].[PricingType])=2)),[Forms]![FrmUserSelection]![PricingType])

What is wrong with the above criteria?
 

Users who are viewing this thread

Back
Top Bottom