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
|
|||
|
|||
Pass parameter value to sub report query
Hi All,
I would like to pass the parameter value of the first prompt (main report) to the second prompt (sub report). For example. Query 1.Main Rpt. Selects all loan records where customer like “*”&[ Name]&”*” Query 2 Sub Rpt. Select all other records where customer like “*”&[]&”*” When I run the report I’d like to pass the value of the 1st prompt to the second prompt so I would only prompt once. Can that be done…how do I go about setting that up? Thanks for all you help. Nats |
#2
|
|||
|
|||
Pass parameter value to sub report query
One way is to enter the parameter in an unbound textbox on a form and call
the form in the criteria. Like "*" & [Forms]![YourFormName]![YourTextBox] & "*" -- KARL DEWEY Build a little - Test a little "Natalie" wrote: Hi All, I would like to pass the parameter value of the first prompt (main report) to the second prompt (sub report). For example. Query 1.Main Rpt. Selects all loan records where customer like “*”&[ Name]&”*” Query 2 Sub Rpt. Select all other records where customer like “*”&[]&”*” When I run the report I’d like to pass the value of the 1st prompt to the second prompt so I would only prompt once. Can that be done…how do I go about setting that up? Thanks for all you help. Nats |
#3
|
|||
|
|||
Pass parameter value to sub report query
Natalie wrote:
I would like to pass the parameter value of the first prompt (main report) to the second prompt (sub report). For example. Query 1.Main Rpt. Selects all loan records where customer like *&[ Name]&* Query 2 Sub Rpt. Select all other records where customer like *&[]&* When I run the report Id like to pass the value of the 1st prompt to the second prompt so I would only prompt once. Can that be donehow do I go about setting that up? That's one of the problems when you use those quick and dirty parameter prompts. Far better is to use a form to open the report from a form where you can use text boxes for the parameter values. This way, the query parameters would be like: Forms!yourform.thetextbox -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
Pass parameter value to sub report query
Yes parameter prompts are quick and easy to use. I'll approach it the way
you suggest. Thanks for you quick response. "Marshall Barton" wrote: Natalie wrote: I would like to pass the parameter value of the first prompt (main report) to the second prompt (sub report). For example. Query 1.Main Rpt. Selects all loan records where customer like “*”&[ Name]&”*” Query 2 Sub Rpt. Select all other records where customer like “*”&[]&”*” When I run the report I’d like to pass the value of the 1st prompt to the second prompt so I would only prompt once. Can that be done…how do I go about setting that up? That's one of the problems when you use those quick and dirty parameter prompts. Far better is to use a form to open the report from a form where you can use text boxes for the parameter values. This way, the query parameters would be like: Forms!yourform.thetextbox -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|