How to filter 2 reports with 1 form? (1 Viewer)

tihmir

Registered User.
Local time
Today, 12:54
Joined
May 1, 2018
Messages
142
Hi all. I have a filter form. I wanna use this form to filter 2 reports and extract in pdf file. Here is my databese:
 

Attachments

theDBguy

I’m here to help
Local time
Today, 12:54
Joined
Oct 29, 2018
Messages
10,742
Hi. You could try adding one more variable for the second report and then add one more OpenReport line to open the second report.
 

tihmir

Registered User.
Local time
Today, 12:54
Joined
May 1, 2018
Messages
142
Hi. You could try adding one more variable for the second report and then add one more OpenReport line to open the second report.
Could you write it for example, please?
 

theDBguy

I’m here to help
Local time
Today, 12:54
Joined
Oct 29, 2018
Messages
10,742
Could you write it for example, please?
In your code, you have these:
Code:
Dim strReport As String
...
strReport = "rpt_Inspections"
...
DoCmd.OpenReport strReport, lngView, , strWhere
All I'm saying is add one more to duplicate those lines. For example:
Code:
Dim strReport As String
[b]Dim strReport2 As String[/b]

...
strReport = "rpt_Inspections"
[b]strReport2 = "NameOfYourOtherReportHere"[/b]

...
DoCmd.OpenReport strReport, lngView, , strWhere
[b]DoCmd.OpenReport strReport2, lngView, , strWhere[/b]
Hope that helps...
 

tihmir

Registered User.
Local time
Today, 12:54
Joined
May 1, 2018
Messages
142
I am not sure Is it possible to create a report like this - one report with Inspections and AnoterTask to filter them with filter form with only one button
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:54
Joined
Sep 21, 2011
Messages
5,977
Something goes wrong, arnelgp . It show me this:


This is when I press button "Another Report"
Try comparing the click event of each control?
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:54
Joined
Sep 21, 2011
Messages
5,977
I am not sure Is it possible to create a report like this - one report with Inspections and AnoterTask to filter them with filter form with only one button
Of course it is, arnelgp has just done it for you, but expected you to write the code for the second report, using the first button as an example.?
 

tihmir

Registered User.
Local time
Today, 12:54
Joined
May 1, 2018
Messages
142
I can not do it! I am trying but nothing :banghead::banghead::banghead:
 

arnelgp

error reading drive A:
Local time
Tomorrow, 03:54
Joined
May 7, 2009
Messages
9,598
you're welcome and go ahead make your next move.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom