Filter a Query from continuos Form

Sergio

Registered User.
Local time
Today, 17:46
Joined
Feb 28, 2002
Messages
42
Hi!

I have a continuos form (list of records) with a tool bar with "filter by form buton". This buton allow to users filter the list of records showed by the form by diferent field criterias.

After applied a filter I need a buton in the tool bar to print the filtered records on a report with a specific design: logo company, header, footer, etc.

I don't know how to apply the same filter used by the form to the Query is the source of that report. Notice the filter by form continuos change depending the user.

I appreciate in advance any help.

Thanks.
 
Hello Sergio!

Look at "DemoFBFReoprtA2000.mdb" (attachment).
Open form and try.
 

Attachments

Tks MStef

Tks for the tip. It seems very simple and easy, I will try it.

For the oder hand, do you know how to apply on the same report besides a filter an order criteria.

It could be a variant of the same code:

Private Sub Command55_Click()
DoCmd.OpenReport "Report1", acViewPreview, , Me.Filter
End Sub


You're very kind for your help.
 
I tried your solution, but ...

Hi MStef

I tried the solution you show me in Form1

The "Open Report1 preview:" button, works fine, meanwhile the Form1 data source is Table1. But if I change the data source for QueryTem appears the following legend: Introduce parameter value "QueryTem.f1"

I don't know what is the problem. Can you help me with this?

Can you tell me how can I include a sort criteria in the expresion that you show me:

Private Sub Command55_Click()
DoCmd.OpenReport "Report1", acViewPreview, , Me.Filter
End Sub


I sent you a modified version of your data base example.

Tks in advance.
 

Attachments

Hello Sergio!
In Report put QueryTem in Record Source properties.
 
Tks MStef

Hi!

Too obvious, no? Incredible but I didn't see.

You'r right, it works fine. Tks for all.


By the way, I don´t know how to include a sort criteria in the expresion:

Private Sub Command55_Click()
DoCmd.OpenReport "Report1", acViewPreview, , Me.Filter
End Sub


Can you help me?

Tks in advance.
 

Users who are viewing this thread

Back
Top Bottom