FIlter n Reports

Wuddle

New Member
Joined
Oct 29, 2002
Messages
22
Thanks to all for their help on my previous problem. I now have another!
I have created a query with 20 fields. From this query I have created a form. The form allows people to use filters to find specific data. The reason for using this system is because the questions vary depending on what information is required from the data. When the filter is completed I want to create a report showing just the filtered information. How can I do this?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi!

I believe what you need is a select query. Instead of using filters, look at your query in design view, and find the field for criteria.
Create a form, and insert a drop-combo, or whatever, for the different values by which you would filter the data. Then, from the query, right-click on the criteria field under the field by whcih you want to filter, and select 'build'. Select 'forms' and go find the name of the combobox you just added. You will probably have to save the form before you can find it.
Then, create a report using the report wizard, and link it to this query. Finally, add a button to the form, and use the wizard to have it print the report. You could also add one the preview the report, again, using the wizard. If you have more than 2 criteria by which to filter, it gets a little trickier...

HTH,

_________________<EMBED src=http://mitglied.lycos.de/corticus/sig.swf width=170 height=70>
Corticus@TheOfficeExperts.com
TheOfficeExperts.com
This message was edited by Corticus on 2003-02-10 09:22
 
Upvote 0
You can do something like this:

Create a report based on the same source as the form (before it is filtered). Then you can put a button on the form, and call the report from there something like this:<pre>Private Sub cmdOpenRpt_Click()
DoCmd.OpenReport "rpt021003", acViewPreview, , Me.Filter
End Sub</pre>
The key part is passing "Me.Filter" as the WhereCondition of the OpenReport method.

HTH,

Russell
This message was edited by Russell Hauf on 2003-02-10 13:16
 
Upvote 0
I have tried using Corticus' method for printing one record from a form that is set-up to display one record based on the selection from a combo box but I keep getting the every pesky “Enter Parameter Value” error message box. I have tried to set the criteria by manually entering the form and name of the combo box that is used to select the record and by using the “build” method. The field that my combo box references is an expression: “FullName: [LastName] & ", " & [FirstName]” and the “build” method produces the following: “Forms![All Contact Data by Individual Form]![Combo1]” Any ideas as to what I am doing wrong?
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,341
Members
451,638
Latest member
MyFlower

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top