K
kev100 via AccessMonster.com
I have a query that prompts the user to enter 1 or more Route #'s to be
included in the query.
The table being queried has a field in every record named ROUTE. The Route
number could be anything from 1 to 1000 (or so).
If they just what to see data for 1 route...they can just enter 1 number (e.g.
"5" <ENTER>) etc.
If they need to see data for several routes....they can enter the route #'s
seperated by commas (e.g. 5,6,9,10,345,2...etc). and the query will display
the data for only those.
Here is the SQL code which enables that feature....it was very generously
provided by Duane Hookom earlier:
WHERE (((InStr("," & [Enter Routes with comma between] & ",","," & CDbl(
[MyTable.Route]) & ","))<>False)
Question:
Is it possible to adjust the above code so that if the user just hits <ENTER>.
.....the query will show the data for ALL routes except for 0 or Null ?
That would really help.....currently, I have 2 different queries......one for
"Select Routes" and another for "ALL Routes." Having 2 separate queries for
basically the same function is beginning to cause issues as this project
grows.
Thanks very much.
included in the query.
The table being queried has a field in every record named ROUTE. The Route
number could be anything from 1 to 1000 (or so).
If they just what to see data for 1 route...they can just enter 1 number (e.g.
"5" <ENTER>) etc.
If they need to see data for several routes....they can enter the route #'s
seperated by commas (e.g. 5,6,9,10,345,2...etc). and the query will display
the data for only those.
Here is the SQL code which enables that feature....it was very generously
provided by Duane Hookom earlier:
WHERE (((InStr("," & [Enter Routes with comma between] & ",","," & CDbl(
[MyTable.Route]) & ","))<>False)
Question:
Is it possible to adjust the above code so that if the user just hits <ENTER>.
.....the query will show the data for ALL routes except for 0 or Null ?
That would really help.....currently, I have 2 different queries......one for
"Select Routes" and another for "ALL Routes." Having 2 separate queries for
basically the same function is beginning to cause issues as this project
grows.
Thanks very much.