How do I display search terms in report?

  • Thread starter Thread starter Reef81
  • Start date Start date
R

Reef81

Hi, I would like to know how to include my query parameters into my
report. For example, if I search a flower database for "pink" and
"blue" I'd like a report which gives me all the corresponding flowers
and specifies which for search term each was found. (ie. rose- pink;
lilac- blue; etc) Thanks!
 
On the form you use to open the report, create an unbound text box
called "txtParameters". Set txtparameters.visible=false
Use code to fill in the value of txtparameters as the user chooses
what they want a report of.

Create a control in the header of your report. Bind the control
source to: "=Forms!YOURCALLINGFORMNAME.txtParameters" (without the
quotes).

You'll have to work out the specifics of coding the programmatical
part of filling in txtParameters.

Good luck,

~J
 
You should try to base your query criteria off a form instead of typing the
criteria directly into your query. Then, the criteria line of your query and
a text field on your report can be based off the same unbound field on a form.
Like: Forms!frmReportMenu!Customer
(where Customer is an unbound field on the form frmReportMenu)(

Your form can then also include a button to preview the report so that the
query is not actually ever opened by the user.
 

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

Back
Top