Pass parameter value to sub report query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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] & "*"
 
Natalie said:
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
 
Yes parameter prompts are quick and easy to use. I'll approach it the way
you suggest.

Thanks for you quick response.


Marshall Barton said:
Natalie said:
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
 
Back
Top