If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Can the Report Update based on a Query being filtered?
I have a set of queries and reports based on those queries that I have made.
I would like to be able to filter the query by a form, and then have the report update according to my filter results so I can print the report. I can filter the query fine, but it won't update on the report. It always shows the whole unfiltered query on the reports. I don't want to have to create a new report each time I filter the query. Any ideas? I am using Access 2007. Thanks! Bryan |
#2
|
|||
|
|||
Can the Report Update based on a Query being filtered?
Bryan wrote:
I have a set of queries and reports based on those queries that I have made. I would like to be able to filter the query by a form, and then have the report update according to my filter results so I can print the report. I can filter the query fine, but it won't update on the report. It always shows the whole unfiltered query on the reports. I don't want to have to create a new report each time I filter the query. Use a query without criteria for the report. Then specify the filter by using the OpenReport menthod's WhereCondition argument (see VBA Help on OpenReport for specifics). -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
Can the Report Update based on a Query being filtered?
On Mon, 16 Jul 2007 09:04:06 -0700, Bryan
wrote: I have a set of queries and reports based on those queries that I have made. I would like to be able to filter the query by a form, and then have the report update according to my filter results so I can print the report. I can filter the query fine, but it won't update on the report. It always shows the whole unfiltered query on the reports. I don't want to have to create a new report each time I filter the query. Any ideas? I am using Access 2007. Thanks! Bryan Make a new form. Include all the fields from the table(s) that you want to filter by. Make a command button that opens the report. Make a command button that will close the form. In the Query the report is based on, for the criteria of each field the report is being filtered with - enter: Like [Forms]![form name]![field name] Open form, fill in data to filter by. Enter * in any field you don't want to filter. Form must stay open. Click command button to open report. Report will go to Query, Query will go to form. Report will be filtered by data in form. Print, save, or whatever. Close report, window will show form to filter by. Make another choice to open a different report or Click command button to close form. Chuck -- |
#4
|
|||
|
|||
Can the Report Update based on a Query being filtered?
Chuck-
Thank you for the help! That is definitely the direction I am wanting to go, so we have a good start. In the perfect world, I would be able to have a drop-down list in the form instead of having to type in the filters and chance mis-spelling...or even better, "check" boxes that would allow me to pick multiple field values to filter by instead of only one per report. Does this make sense? Is that possible? Thanks again for your help! Bryan "Chuck" wrote: On Mon, 16 Jul 2007 09:04:06 -0700, Bryan wrote: I have a set of queries and reports based on those queries that I have made. I would like to be able to filter the query by a form, and then have the report update according to my filter results so I can print the report. I can filter the query fine, but it won't update on the report. It always shows the whole unfiltered query on the reports. I don't want to have to create a new report each time I filter the query. Any ideas? I am using Access 2007. Thanks! Bryan Make a new form. Include all the fields from the table(s) that you want to filter by. Make a command button that opens the report. Make a command button that will close the form. In the Query the report is based on, for the criteria of each field the report is being filtered with - enter: Like [Forms]![form name]![field name] Open form, fill in data to filter by. Enter * in any field you don't want to filter. Form must stay open. Click command button to open report. Report will go to Query, Query will go to form. Report will be filtered by data in form. Print, save, or whatever. Close report, window will show form to filter by. Make another choice to open a different report or Click command button to close form. Chuck -- |
Thread Tools | |
Display Modes | |
|
|