Reports and Filters

  • Thread starter Thread starter Master H
  • Start date Start date
M

Master H

I am trying to create a report.

I have some tables with data, linked to a form.

The form allows filtering of the data within the tables.

Having applied a filter within the form, I would like to create a report
where the fields returned are user defined each time the report is run (i.e.
not static). Can anyone help?
 
I am trying to create a report.

I have some tables with data, linked to a form.

The form allows filtering of the data within the tables.

Having applied a filter within the form, I would like to create a report
where the fields returned are user defined each time the report is run (i.e.
not static). Can anyone help?

If I understand your question correctly, open the report from a
command button on the form after the data has been filtered, using:
DoCmd.OpenReport "ReportName",acPreview, , Me.Filter

So if the form filter is
[Lastname] = 'Jones' and [FirstName] = 'Frank'
that is how the report will be filtered.
If the form filter is
[Zipcode] = '90023'
That is how the report will be filtered.
Note: Me.Filter should be written literally, just as I have it.
 
Try this:
http://www.datapigtechnologies.com/flashfiles/passparamtoreport.html

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


fredg said:
I am trying to create a report.

I have some tables with data, linked to a form.

The form allows filtering of the data within the tables.

Having applied a filter within the form, I would like to create a report
where the fields returned are user defined each time the report is run (i.e.
not static). Can anyone help?

If I understand your question correctly, open the report from a
command button on the form after the data has been filtered, using:
DoCmd.OpenReport "ReportName",acPreview, , Me.Filter

So if the form filter is
[Lastname] = 'Jones' and [FirstName] = 'Frank'
that is how the report will be filtered.
If the form filter is
[Zipcode] = '90023'
That is how the report will be filtered.
Note: Me.Filter should be written literally, just as I have it.
 
Back
Top