Formatting based on parameter form

  • Thread starter gmazza via AccessMonster.com
  • Start date
G

gmazza via AccessMonster.com

I have a parameter form that asks for dates, as well as a system name to
report on.
If a system name is chosen, the report shows up displaying the current system,
with a count of records at the end.
If they choose ALL systems, then I want to be able to call the same report,
but now I need it grouped by system name and a total count for each grouped
system, and a grand total at the end for all systems.
I have 2 reports doing each but can I do it all in 1 report is my question
and how?
Thanks for youre help!
 
D

Duane Hookom

You shouldn't need duplicate/similar reports. You can use the WHERE CONDITION
of the DoCmd.OpenReport to filter the report. If you want to add more
functionality, you can use code to hide or show sections or controls.
 
G

gmazza via AccessMonster.com

Ok I got it working for ALL systems, but if I want a specific system, it
still comes back with all the systems. I am setting the system name in the
filter property to the specific system they choose from the parameter form.
Even after I close my report it still shows my filter in the properties of
the report.
I even run my query with the criteria being the same as my filter and the
query runs correctly with just the records showing up for that system.
What could I be doing wrong?

Duane said:
You shouldn't need duplicate/similar reports. You can use the WHERE CONDITION
of the DoCmd.OpenReport to filter the report. If you want to add more
functionality, you can use code to hide or show sections or controls.
I have a parameter form that asks for dates, as well as a system name to
report on.
[quoted text clipped - 6 lines]
and how?
Thanks for youre help!
 
D

Duane Hookom

What are you doing to filter the report? Is there a criteria in the report's
record source query or are you using the Where Condition in DoCmd.OpenReport?

--
Duane Hookom
Microsoft Access MVP


gmazza via AccessMonster.com said:
Ok I got it working for ALL systems, but if I want a specific system, it
still comes back with all the systems. I am setting the system name in the
filter property to the specific system they choose from the parameter form.
Even after I close my report it still shows my filter in the properties of
the report.
I even run my query with the criteria being the same as my filter and the
query runs correctly with just the records showing up for that system.
What could I be doing wrong?

Duane said:
You shouldn't need duplicate/similar reports. You can use the WHERE CONDITION
of the DoCmd.OpenReport to filter the report. If you want to add more
functionality, you can use code to hide or show sections or controls.
I have a parameter form that asks for dates, as well as a system name to
report on.
[quoted text clipped - 6 lines]
and how?
Thanks for youre help!
 
G

gmazza via AccessMonster.com

In my code I am setting the Me.Filter on the report.
There is no criteria in the query and I am not using the where condition in
the open report.
If I add criteria to the query, the records show up.
So thats why I am confused as I filter the report the same as I did to the
query when I tested it, and all records show up, which is wrong.

Duane said:
What are you doing to filter the report? Is there a criteria in the report's
record source query or are you using the Where Condition in DoCmd.OpenReport?
Ok I got it working for ALL systems, but if I want a specific system, it
still comes back with all the systems. I am setting the system name in the
[quoted text clipped - 14 lines]
 
D

Duane Hookom

If you have code that doesn't seem to be working, you need to provide the
code.

I never apply a filter in the On Open of a report. I almost always use the
Where Condition of the DoCmd.OpenReport method. If I can't use this method, I
will set the filter the criteria of the report's Record Source.

--
Duane Hookom
Microsoft Access MVP


gmazza via AccessMonster.com said:
In my code I am setting the Me.Filter on the report.
There is no criteria in the query and I am not using the where condition in
the open report.
If I add criteria to the query, the records show up.
So thats why I am confused as I filter the report the same as I did to the
query when I tested it, and all records show up, which is wrong.

Duane said:
What are you doing to filter the report? Is there a criteria in the report's
record source query or are you using the Where Condition in DoCmd.OpenReport?
Ok I got it working for ALL systems, but if I want a specific system, it
still comes back with all the systems. I am setting the system name in the
[quoted text clipped - 14 lines]
and how?
Thanks for youre help!
 

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