N
NBABA21
I'm creating an Access database that will function as a query builder
through a Forms interface. I have approximately 20 dropdowns which
will allow users to select their criteria, and then a command button
that will run a query. The unbound dropdowns default to the text "All"
which, I hope, will act as if there is no criteria in the query. I
tried an IIF stamement like this:
IIF([forms]![main]![oppty id]="All","*",[forms]![main]![oppty id])
This does not return the correct results. I want the True part of the
stament to return all values, whether null or otherwise. (I.e. as if
there was no criteria in that query field at all.) Does anyone know
how to do this?
Second question...
I have checkboxes next to each of the 20 criteria fields. The
intention for these checkboxes is to change the visible property of the
field once the query is run. In other words, if the User puts a check
next to the field "Oppty Id" it will appear once the query is run. If
there is no check, the fields visible property will remain False. Is
this possible to do in a query? (I know it can be done in a report).
Any ideas would be appreciated!
through a Forms interface. I have approximately 20 dropdowns which
will allow users to select their criteria, and then a command button
that will run a query. The unbound dropdowns default to the text "All"
which, I hope, will act as if there is no criteria in the query. I
tried an IIF stamement like this:
IIF([forms]![main]![oppty id]="All","*",[forms]![main]![oppty id])
This does not return the correct results. I want the True part of the
stament to return all values, whether null or otherwise. (I.e. as if
there was no criteria in that query field at all.) Does anyone know
how to do this?
Second question...
I have checkboxes next to each of the 20 criteria fields. The
intention for these checkboxes is to change the visible property of the
field once the query is run. In other words, if the User puts a check
next to the field "Oppty Id" it will appear once the query is run. If
there is no check, the fields visible property will remain False. Is
this possible to do in a query? (I know it can be done in a report).
Any ideas would be appreciated!