Nitesh9999
Nitesh9999
- Local time
- Today, 23:28
- Joined
- Mar 16, 2005
- Messages
- 42
Hi first time here goes…
I’m querying a table to filter by month using a parameter. For example when you run the query the parameter box pops up and you enter the month for which you want the data from eg month 11 for November’s records. However there are cases where I want all the records and for this I used:
Criteria Like [Enter Category ID:]
Or [Enter Category ID:] Is Null
This meant that if I entered nothing in the parameter box all the records for all months appeared and this worked great.
The problem occurred when I tried using the above for 2 fields. What I wanted was to filter by both month and city (basically the city where the transaction took place). But I also wanted the ability to enter a month value in the first parameter box and leave the city parameter box blank. This should return all records for a particular month from all cities. But when I left the second box blank (or vice versa and left the first blank and entered a city in the second) it returned no records.
Is there a way of resolving this so I can filter by only entering a value in one parameter box and leaving the other blank?
I know its messy and I haven’t explained myself very well but any help would be appreciated, thanks.
I’m querying a table to filter by month using a parameter. For example when you run the query the parameter box pops up and you enter the month for which you want the data from eg month 11 for November’s records. However there are cases where I want all the records and for this I used:
Criteria Like [Enter Category ID:]
Or [Enter Category ID:] Is Null
This meant that if I entered nothing in the parameter box all the records for all months appeared and this worked great.
The problem occurred when I tried using the above for 2 fields. What I wanted was to filter by both month and city (basically the city where the transaction took place). But I also wanted the ability to enter a month value in the first parameter box and leave the city parameter box blank. This should return all records for a particular month from all cities. But when I left the second box blank (or vice versa and left the first blank and entered a city in the second) it returned no records.
Is there a way of resolving this so I can filter by only entering a value in one parameter box and leaving the other blank?
I know its messy and I haven’t explained myself very well but any help would be appreciated, thanks.