Criteria CHOOSE problem and using Operator

  • Thread starter Thread starter Vantastic
  • Start date Start date
V

Vantastic

I've set up a dynamic filter for a query which uses information on a form.
I have a frame with 4 options, these are:<
=
All

If All is selected, then obviously the filtering is turned off for this
field. If any of the others are selected, then it is supposed to look up a
number from another field and use the operator appropriate to it.

Here is the failing Criteria in the Query:

Choose([Forms]![tasks_manager]![Frame19],>[Forms]![tasks_manager]![txtNoParties],<[Forms]![tasks_manager]![txtNoParties],[Forms]![tasks_manager]![txtNoParties],[CountOfName])

The last 2 options work well (= and All) but I must be having a dull moment
I just can't get it to use the operators infront of the object location
([Forms]![tasks_manager]![frame19])

Thanks for your help
 
hi,
Here is the failing Criteria in the Query:

Choose([Forms]![tasks_manager]![Frame19],>[Forms]![tasks_manager]![txtNoParties],<[Forms]![tasks_manager]![txtNoParties],[Forms]![tasks_manager]![txtNoParties],[CountOfName])

The last 2 options work well (= and All) but I must be having a dull moment
I just can't get it to use the operators infront of the object location
([Forms]![tasks_manager]![frame19])
You cannot return partial expressions. Modify your query SQL statement
(untested):

SELECT *
FROM ...
WHERE
Choose(
[Forms]![tasks_manager]![Frame19],
[yourFieldName]>[Forms]![tasks_manager]![txtNoParties],
[yourFieldName]<[Forms]![tasks_manager]![txtNoParties],
[yourFieldName]=[Forms]![tasks_manager]![txtNoParties],
[yourFieldName]=[CountOfName]
)


mfG
--> stefan <--
 
Back
Top