How to get all records in a Query even you select a record from a conbox box

  • Thread starter MacrossHunter77 via AccessMonster.com
  • Start date
M

MacrossHunter77 via AccessMonster.com

Hello there well I have a big probem I am trying to create a query that I can
select a month using a combo box in a form and returns with all the record
and not ignoring the rest of the months for example If I have records for
July it will come only july's except the other month I prefer to get all the
months including july's I now is going to make duplicate in July but I don't
care that is what I need I used is null in the criteria and it works just
fine but I notice that if I Select the month of august all the records from
july's are gone only shows august anyway here is a example of the query I
hope you understand.

Three Fields in the query:
Parks, Month, Year
with the criterias in the Month and Year field
MONTH FIELD CRITERIA [Forms]![Borough Monthy Productivity Report]![Select
Month], YEAR FIELD CRITERIA [Forms]![Borough Monthy Productivity Report]!
[Year] OR Is Null

When I select the month of July's it show all July's month except the rest of
the months I want to show all the records even I select july's (which
multiple record will come out but that is ok)

and if I select the month of august all the record from july won't show, it
only shows all the records including "nulls" and august's.

Please anybody could help me on this thanks in advance
 
G

Guest

Use the criterias below. If you do not select a month you will get all
months. The same for not selecting a year will result in all years.
Criterias in the Month
[Forms]![Borough Monthy Productivity Report]![Select Month] OR
[Forms]![Borough Monthy Productivity Report]![Select Month] Is Null

Criterias in the Year field
[Forms]![Borough Monthy Productivity Report]![Year] OR [Forms]![Borough
Monthy Productivity Report]![Year] Is Null
 
M

MacrossHunter77 via AccessMonster.com

Hello karl thanks for responding my message well I tried that but it doesn't
work it only show me the month that I have selected, I want all the records
even I selected the month that I want to appear in my report let me give u a
example:

I am doing a monthly report about how many incidents we have in the parks on
each borough, I have a listing of parks which belongs to the bronx is around
200 parks that is 200 records that I put in the table, anyway most parks
report no incidents so the value is going to be null but other parks reports
incidents that happens everyday. now the expression that I created before the
one I posted previously is the one that shows me all the records from july's
and the null and that is correct, but I noticed that when I selected the
month of August all the records from that month will show including nulls but
not the ones in July's: ok the total of records are 200 right I get duplicate
in the table so the amount will change anyway there is 200 so the records
that I have in July are 4 and from august are 10 now if I select julys the
null records will be 196 and 4 that is in use. ok that's good now when I
selected august it will show 186 records that are nulls and 10 in used for
that month, but what happened to the other 4 from july ???. that is the
reason that I need some help on how to resolve this problem, but if you have
a ny more suggestion please let me know still thank again have a good day
PEACE!!!
Hello there well I have a big probem I am trying to create a query that I can
select a month using a combo box in a form and returns with all the record
and not ignoring the rest of the months for example If I have records for
July it will come only july's except the other month I prefer to get all the
months including july's I now is going to make duplicate in July but I don't
care that is what I need I used is null in the criteria and it works just
fine but I notice that if I Select the month of august all the records from
july's are gone only shows august anyway here is a example of the query I
hope you understand.

Three Fields in the query:
Parks, Month, Year
with the criterias in the Month and Year field
MONTH FIELD CRITERIA [Forms]![Borough Monthy Productivity Report]![Select
Month], YEAR FIELD CRITERIA [Forms]![Borough Monthy Productivity Report]!
[Year] OR Is Null

When I select the month of July's it show all July's month except the rest of
the months I want to show all the records even I select july's (which
multiple record will come out but that is ok)

and if I select the month of august all the record from july won't show, it
only shows all the records including "nulls" and august's.

Please anybody could help me on this thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top