Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-21-2019, 07:26 AM   #1
tihmir
Newly Registered User
 
Join Date: May 2018
Posts: 67
Thanks: 23
Thanked 0 Times in 0 Posts
tihmir is on a distinguished road
How to filter 2 reports with 1 form?

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:
Attached Files
File Type: zip Database_EN_21.zip (198.5 KB, 12 views)

tihmir is offline   Reply With Quote
Old 10-21-2019, 07:37 AM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,923
Thanks: 57
Thanked 1,296 Times in 1,277 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: How to filter 2 reports with 1 form?

Hi. You could try adding one more variable for the second report and then add one more OpenReport line to open the second report.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 10-21-2019, 07:46 AM   #3
tihmir
Newly Registered User
 
Join Date: May 2018
Posts: 67
Thanks: 23
Thanked 0 Times in 0 Posts
tihmir is on a distinguished road
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by theDBguy View Post
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?

tihmir is offline   Reply With Quote
Old 10-21-2019, 07:49 AM   #4
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,923
Thanks: 57
Thanked 1,296 Times in 1,277 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by tihmir View Post
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
Dim strReport2 As String

...
strReport = "rpt_Inspections"
strReport2 = "NameOfYourOtherReportHere"

...
DoCmd.OpenReport strReport, lngView, , strWhere
DoCmd.OpenReport strReport2, lngView, , strWhere
Hope that helps...
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 10-21-2019, 08:30 AM   #5
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: How to filter 2 reports with 1 form?

check the Click event of the button.
Attached Files
File Type: zip Database_EN_21.zip (75.6 KB, 10 views)
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 10-21-2019, 09:30 AM   #6
tihmir
Newly Registered User
 
Join Date: May 2018
Posts: 67
Thanks: 23
Thanked 0 Times in 0 Posts
tihmir is on a distinguished road
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by arnelgp View Post
check the Click event of the button.
Something goes wrong, arnelgp . It show me this:


This is when I press button "Another Report"
Attached Images
File Type: png 1.png (4.6 KB, 14 views)
tihmir is offline   Reply With Quote
Old 10-21-2019, 09:36 AM   #7
tihmir
Newly Registered User
 
Join Date: May 2018
Posts: 67
Thanks: 23
Thanked 0 Times in 0 Posts
tihmir is on a distinguished road
Re: How to filter 2 reports with 1 form?

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

tihmir is offline   Reply With Quote
Old 10-21-2019, 09:38 AM   #8
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,395
Thanks: 435
Thanked 805 Times in 780 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by tihmir View Post
Something goes wrong, arnelgp . It show me this:


This is when I press button "Another Report"
Try comparing the click event of each control?
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is online now   Reply With Quote
Old 10-21-2019, 09:41 AM   #9
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,395
Thanks: 435
Thanked 805 Times in 780 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by tihmir View Post
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.?
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is online now   Reply With Quote
Old 10-21-2019, 09:51 AM   #10
tihmir
Newly Registered User
 
Join Date: May 2018
Posts: 67
Thanks: 23
Thanked 0 Times in 0 Posts
tihmir is on a distinguished road
Re: How to filter 2 reports with 1 form?

I can not do it! I am trying but nothing
tihmir is offline   Reply With Quote
Old 10-21-2019, 10:00 AM   #11
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,395
Thanks: 435
Thanked 805 Times in 780 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by tihmir View Post
I can not do it! I am trying but nothing
Code:
=doPrintReport("rpt_AnotherTask")
????????????
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is online now   Reply With Quote
Old 10-21-2019, 10:28 AM   #12
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: How to filter 2 reports with 1 form?

don't bang your head.
this will appease you.
Attached Files
File Type: zip Database_EN_21.zip (83.2 KB, 11 views)
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
tihmir (10-21-2019)
Old 10-21-2019, 10:50 AM   #13
tihmir
Newly Registered User
 
Join Date: May 2018
Posts: 67
Thanks: 23
Thanked 0 Times in 0 Posts
tihmir is on a distinguished road
Re: How to filter 2 reports with 1 form?

Quote:
Originally Posted by arnelgp View Post
don't bang your head.
this will appease you.
Now it is works perfect, arnelgp!!!Thank you again!

Last edited by tihmir; 10-22-2019 at 02:25 AM.
tihmir is offline   Reply With Quote
Old 10-21-2019, 11:01 AM   #14
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,569
Thanks: 68
Thanked 2,745 Times in 2,630 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: How to filter 2 reports with 1 form?

you're welcome and go ahead make your next move.

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
tihmir (10-21-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing & Filter Reports via a Form renickj Forms 1 10-19-2011 01:16 PM
Making a filter for a form using Reports and queries aaron2 General 0 08-17-2011 05:45 PM
Is there a Way for making a form to filter searches for Reports? rodvaN General 1 05-22-2009 02:32 AM
filter mulitple reports with one form workingpoor Reports 0 08-15-2006 10:39 AM
using selection from Filter by Form to filter reports Karl K Modules & VBA 2 02-04-2000 01:44 PM




All times are GMT -8. The time now is 08:57 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World