Criteria of query

G

Guest

I have been trying to set the criteria of my payroll query with and Grouped
optionbox on an userform. I have 2 payroll types 1 and 2. I have 3
optionbuttons in the group on the form. My problem is if I want to see 1 and
2. I thought I could say

IIf([Forms]![frmReports]![OptionGroupPayType]=3,[Forms]![frmReports]![OptionGroupPayType]>0,[Forms]![frmReports]![OptionGroupPayType])

Any help I would be greatfull

Thanks Mike
 
J

John Spencer

You can't declare the comparison operator using a parameter query. You can
try

Between IIF(
[Forms]![frmReports]![OptionGroupPayType]=3,1,[Forms]![frmReports]![OptionGroupPayType])
And
IIF([Forms]![frmReports]![OptionGroupPayType]=3,[Forms]![frmReports]![OptionGroupPayType],2)

OR enter the following in one criteria cell (Access will reformat)
[Forms]![frmReports]![OptionGroupPayType] OR
[Forms]![frmReports]![OptionGroupPayType]=3

Or add the reference as a field and apply criteria to it.
Field: [Forms]![frmReports]![OptionGroupPayType]
Criteria(1): 3
Criteria(2): <<Blank>>

Fiield: PayrollType
Criteria(1): <<Blank>>
Criteria(2): [Forms]![frmReports]![OptionGroupPayType]

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top