Pass parameter value to sub report query

N

Natalie

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
 
K

KARL DEWEY

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] & "*"
 
M

Marshall Barton

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
 
N

Natalie

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top