G
Guest
I'm trying to run a query from a form where the user fills in various
parameters with option groups.
The table contains a several different values (ranging from 5.5 to 9) in a
particular field, and I want the query to group them in the query so that all
values from 5.5 to 7 come up in one instance, and all the values from 8 to 9
in another.
In the query grid, if I simply enter, "Between 5.5 And 7", the query runs as
expected and returns all records where the value is within those parameters.
However, if I use an IIf statement such as:
IIf([Forms]![frmRunTrackModelQuery]![fraDistance]=1,Between 5.5 And
7,Between 8 And 9)
.... the query returns no records whatsoever.
All attempts at using different sorts of bracked, quotes, etc., have failed.
What am I doing wrong?
Kevin
parameters with option groups.
The table contains a several different values (ranging from 5.5 to 9) in a
particular field, and I want the query to group them in the query so that all
values from 5.5 to 7 come up in one instance, and all the values from 8 to 9
in another.
In the query grid, if I simply enter, "Between 5.5 And 7", the query runs as
expected and returns all records where the value is within those parameters.
However, if I use an IIf statement such as:
IIf([Forms]![frmRunTrackModelQuery]![fraDistance]=1,Between 5.5 And
7,Between 8 And 9)
.... the query returns no records whatsoever.
All attempts at using different sorts of bracked, quotes, etc., have failed.
What am I doing wrong?
Kevin