Romio_1968
Member
- Local time
- Today, 17:04
- Joined
- Jan 11, 2023
- Messages
- 126
On a form called "SearchTitle_Frm" i set an option gropup called OptGroup, with 3 mutually exclusive opt. buttons, that returns 3 possible values and it is never empty:
0 - for depleted supply
1 - for existing supply
2 - for all items
Based on this value, a textbox called OptValue receives values 0, 1 or 2 from OptGroup
A query returns in a field the Supply of items, form 0 to n
I set a criteria to obtain the following:
Only records with 0 suply, for OptValue = 0
All records with positive supply (>0), for OptValue =1
All records, with 0 or greater supply, for OptValue = 2
The criteria i set is:
IIf(Forms![YourFormName]![OptionButtonName] = 0, 0, IIf(Forms![YourFormName]![OptionButtonName] = 1, ">0", "Like '*'"))
Obvious I did something wrong, because the results are not as they should be
For OptValue =0, the result is OK
For OptValue = 1 or 2, the query returns no results at all.
If you can, please, help with this issue.
Thank You
0 - for depleted supply
1 - for existing supply
2 - for all items
Based on this value, a textbox called OptValue receives values 0, 1 or 2 from OptGroup
A query returns in a field the Supply of items, form 0 to n
I set a criteria to obtain the following:
Only records with 0 suply, for OptValue = 0
All records with positive supply (>0), for OptValue =1
All records, with 0 or greater supply, for OptValue = 2
The criteria i set is:
IIf(Forms![YourFormName]![OptionButtonName] = 0, 0, IIf(Forms![YourFormName]![OptionButtonName] = 1, ">0", "Like '*'"))
Obvious I did something wrong, because the results are not as they should be
For OptValue =0, the result is OK
For OptValue = 1 or 2, the query returns no results at all.
If you can, please, help with this issue.
Thank You