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

tihmir

Registered User.
Local time
Today, 07:07
Joined
May 1, 2018
Messages
257
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

  • Database_EN_21.zip
    198.5 KB · Views: 121

theDBguy

I’m here to help
Staff member
Local time
Today, 07:07
Joined
Oct 29, 2018
Messages
21,357
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, 07:07
Joined
May 1, 2018
Messages
257
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
Staff member
Local time
Today, 07:07
Joined
Oct 29, 2018
Messages
21,357
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...
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:07
Joined
May 7, 2009
Messages
19,169
check the Click event of the button.
 

Attachments

  • Database_EN_21.zip
    75.6 KB · Views: 128

tihmir

Registered User.
Local time
Today, 07:07
Joined
May 1, 2018
Messages
257
check the Click event of the button.
Something goes wrong, arnelgp . It show me this:


This is when I press button "Another Report"
 

Attachments

  • 1.png
    1.png
    4.6 KB · Views: 122

tihmir

Registered User.
Local time
Today, 07:07
Joined
May 1, 2018
Messages
257
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, 14:07
Joined
Sep 21, 2011
Messages
14,042
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, 14:07
Joined
Sep 21, 2011
Messages
14,042
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, 07:07
Joined
May 1, 2018
Messages
257
I can not do it! I am trying but nothing :banghead::banghead::banghead:
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:07
Joined
May 7, 2009
Messages
19,169
don't bang your head.
this will appease you.
 

Attachments

  • Database_EN_21.zip
    83.2 KB · Views: 130

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:07
Joined
May 7, 2009
Messages
19,169
you're welcome and go ahead make your next move.
 

Users who are viewing this thread

Top Bottom