Report

lisanneg

New Member
Joined
Mar 25, 2011
Messages
3
I'm making a report based on three parameter queries, two used in the main report and one in the subreport. The parameter is the same in all of three queries. When I run the report, I get asked three times the same question I used as parameter. How can I avoid repeating the same question?

Thanks in advance!
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,701
Office Version
  1. 2016
Platform
  1. Windows
Welcome to the Forum,

Use a form and place in a text box, then point your queries to the text box for the parameters, then add a command button to preview the report and it will use the text box so you only complete it once.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,974
Office Version
  1. 365
Platform
  1. Windows
Another thing I have done before is create a table to store your parameters, then make your form "bound" to that table. Then all the paramters you enter on the form will be stored in that table.

Then, link all your queries to that table to get your parameters.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,974
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

I am not sure if you are talking to Trevor or me.

The easiest thing to do with my suggestion is to create a new table with fields for your parameters, then just create an Auto Form from this table. Then you will have your bound form.

Then just link the table to your queries on the parameter fields (I am assuming you know how to do simple queries).
 

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,701
Office Version
  1. 2016
Platform
  1. Windows
I agree with Joe.

What is your knowledge like, as creating form is easy enough.
 

lisanneg

New Member
Joined
Mar 25, 2011
Messages
3
Never mind, I already have the solution. I removed the parameter in the query that was used in the subreport. (The parameter is an ID) Then I linked the ID from the subreport with the ID from the main report.

Thank you for your help!
 

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,701
Office Version
  1. 2016
Platform
  1. Windows
Pleased to read you have resolved this yourself.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,331
Members
414,446
Latest member
CRAVIN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top