If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Parameters in subreports
I have a report with 3 subreports. Each subreport uses
the same parameter. How can I pass the input parameter from one subreport to the next, so the user will not have to input the parameter 3 times? Thanks. |
#2
|
|||
|
|||
Parameters in subreports
Simplest solution is to get the queries to read the value from a form.
Create a form with a text box, where the user can enter the value. In the Criteria row of each query under the appropriate field, enter: [Forms]![MyForm]![MyTextBox] It is a good idea to declare these parameters in the query, so it understands the data type. For example, if this is a date, in query design view choose Parameters on the Query menu, and enter: [Forms]![MyForm]![MyTextBox] Date/Time It also helps to set the Format property of the text box to Short Date (or General Number or whatever). -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Vince" wrote in message ... I have a report with 3 subreports. Each subreport uses the same parameter. How can I pass the input parameter from one subreport to the next, so the user will not have to input the parameter 3 times? Thanks. |
#3
|
|||
|
|||
Parameters in subreports
Thanks, Allen. I'm trying to do that but running into
problems. I will keep trying, following your suggestions and the Help page "Use a form to enter report criteria". Does it matter that my main report is unbound? And will this input date persevere until the entire report (and subreports) is completed? -----Original Message----- Simplest solution is to get the queries to read the value from a form. Create a form with a text box, where the user can enter the value. In the Criteria row of each query under the appropriate field, enter: [Forms]![MyForm]![MyTextBox] It is a good idea to declare these parameters in the query, so it understands the data type. For example, if this is a date, in query design view choose Parameters on the Query menu, and enter: [Forms]![MyForm]![MyTextBox] Date/Time It also helps to set the Format property of the text box to Short Date (or General Number or whatever). -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Vince" wrote in message ... I have a report with 3 subreports. Each subreport uses the same parameter. How can I pass the input parameter from one subreport to the next, so the user will not have to input the parameter 3 times? Thanks. . |
#4
|
|||
|
|||
Parameters in subreports
Thanks again! It is now working, and I can proceed with
the project. -----Original Message----- Simplest solution is to get the queries to read the value from a form. Create a form with a text box, where the user can enter the value. In the Criteria row of each query under the appropriate field, enter: [Forms]![MyForm]![MyTextBox] It is a good idea to declare these parameters in the query, so it understands the data type. For example, if this is a date, in query design view choose Parameters on the Query menu, and enter: [Forms]![MyForm]![MyTextBox] Date/Time It also helps to set the Format property of the text box to Short Date (or General Number or whatever). -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Vince" wrote in message ... I have a report with 3 subreports. Each subreport uses the same parameter. How can I pass the input parameter from one subreport to the next, so the user will not have to input the parameter 3 times? Thanks. . |
#5
|
|||
|
|||
Parameters in subreports
Yes, but what happens when the same report can be opened from two different
forms ? |
#6
|
|||
|
|||
Parameters in subreports
You open the form invisible and place values into the controls that are
required. -- Duane Hookom MS Access MVP "Savvoulidis Iordanis" wrote in message ... Yes, but what happens when the same report can be opened from two different forms ? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I subquery using different parameters? | psPaul | Running & Setting Up Queries | 1 | June 19th, 2004 02:05 AM |
Too few parameters... | BobRoyAce | Running & Setting Up Queries | 1 | June 7th, 2004 02:14 PM |
Error passing parameters | Brian | New Users | 3 | May 11th, 2004 11:09 PM |
Functions parameters separator | Jean Luc | Worksheet Functions | 2 | March 4th, 2004 12:45 PM |