Open several Access reports from one condition combobox (1 Viewer)

Nyan Win

New member
Local time
Today, 23:53
Joined
Jun 19, 2020
Messages
8
I want to open ten different Access reports while clicking a combobox with specific condition using DoCmd Open report.
How can I write codes for DoCmd .OpenReport to open ten different Access reports

thanks advanced
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:23
Joined
Oct 29, 2018
Messages
21,358
You can write 10 DoCmd.OpenReport lines.
 

Micron

AWF VIP
Local time
Today, 13:23
Joined
Oct 20, 2018
Messages
3,476
In the AfterUpdate event of the combo, test for your condition and if true, write 10 DoCmd .OpenReport lines, one for each report name.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 10:23
Joined
Aug 30, 2003
Messages
36,118
FYI, I moved your thread out of the introductions forum.
 

Nyan Win

New member
Local time
Today, 23:53
Joined
Jun 19, 2020
Messages
8
You can write 10 DoCmd.OpenReport lines.
Thanks I just wrote like that, But the code " "Township_Code=" & Me.txtTsp_Pcode " needed for each report and message asks "Enter parameter value" for Township code for each reports. If I want to open 10 reports, I have to reply (same)Township code 10 times. It is tedious. I want to type Township code one time to appear for all reports. Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:23
Joined
May 7, 2009
Messages
19,169
use Multi-select Listbox instead of combobox.
 

Nyan Win

New member
Local time
Today, 23:53
Joined
Jun 19, 2020
Messages
8
FYI, I moved your thread out of the introductions forum.
Thank you. I just wrote like that, But the code " "Township_Code=" & Me.txtTsp_Pcode " needed for each report and message asks "Enter parameter value" for Township code for each reports. If I want to open 10 reports, I have to reply (same)Township code 10 times. It is tedious. I want to type Township code one time to appear for all reports. Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:23
Joined
Oct 29, 2018
Messages
21,358
Thanks I just wrote like that, But the code " "Township_Code=" & Me.txtTsp_Pcode " needed for each report and message asks "Enter parameter value" for Township code for each reports. If I want to open 10 reports, I have to reply (same)Township code 10 times. It is tedious. I want to type Township code one time to appear for all reports. Thanks
Hi. If you're getting a prompt from your reports, then maybe you're using a query with a parameter. If so, try taking out the criteria from the query, since you are now trying to apply it now using code.
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:23
Joined
Sep 21, 2011
Messages
14,044
Thank you. I just wrote like that, But the code " "Township_Code=" & Me.txtTsp_Pcode " needed for each report and message asks "Enter parameter value" for Township code for each reports. If I want to open 10 reports, I have to reply (same)Township code 10 times. It is tedious. I want to type Township code one time to appear for all reports. Thanks
Copying and pasting the same post is not going to help?
Plus keeping two threads going on it is also not going to help?
 

Users who are viewing this thread

Top Bottom