Chintsapete
Registered User.
- Local time
- Today, 05:21
- Joined
- Jun 15, 2012
- Messages
- 137
Hi all
I have a problem with query criteria which really doesn't make sense.
I have table with column PayPeriodId, 1-4, column PayPeriod 1= Daily, 2= Weekly, 3= Forthnightly, 4= Monthly
On a popup form I have ComboBox where I look up this values.
I want to use this ComboBox values in query as criteria, so it applies a filter. If I do forthnightly it selects only those employees and if I do monthly I want to have the forthnightly and monthly employees.
So below criteria works as such to select either or, but is not what I want.
I tired the below, but all not working
Anybody has any idea why? Sure doesn't make sense to me
Thanks
I have a problem with query criteria which really doesn't make sense.
I have table with column PayPeriodId, 1-4, column PayPeriod 1= Daily, 2= Weekly, 3= Forthnightly, 4= Monthly
On a popup form I have ComboBox where I look up this values.
I want to use this ComboBox values in query as criteria, so it applies a filter. If I do forthnightly it selects only those employees and if I do monthly I want to have the forthnightly and monthly employees.
So below criteria works as such to select either or, but is not what I want.
Code:
IIf([Forms]![SalaryPrepPopup]![Payperiod]=3,3,IIf([Forms]![SalaryPrepPopup]![Payperiod]=4,4))
I tired the below, but all not working
Code:
IIf([Forms]![SalaryPrepPopup]![Payperiod]=3,3,IIf([Forms]![SalaryPrepPopup]![Payperiod]=4,>=3))
Code:
IIf([Forms]![SalaryPrepPopup]![Payperiod]=3,3,IIf([Forms]![SalaryPrepPopup]![Payperiod]=4,Is Null))
Code:
IIf([Forms]![SalaryPrepPopup]![Payperiod]=3,3,IIf([Forms]![SalaryPrepPopup]![Payperiod]=4,""))
Code:
IIf([Forms]![SalaryPrepPopup]![Payperiod]=3,3,IIf([Forms]![SalaryPrepPopup]![Payperiod]=4,3 And 4))
Anybody has any idea why? Sure doesn't make sense to me
Thanks