How can I access a field in a "Where Condition" on a report

B

Brad

This is probably a dumb question, but I just cannot seem to figure it out.
I have just started to experiment with Access Macros this week.

I have a Command Button on a form to collect a string of text.

This string of text is used to control which customer addresses are to
appear on a report.

I have set up a Macro to do an “OpenReport†with this string of text in the
“Where Condition†as shown here…
[TblCustomers]![CustCity] Like "*" & ["MyString"] & "*"

The report opens up fine and the results are exactly what I am looking for.

Now I want to add a Text Box on the top of the report to show the users
exactly what they entered in for the string of text.

How can I access the field that I called MyString and put it into a Text Box
at the top of the report?

Thanks in advance for your help!
Brad
 
A

Albert D. Kallal

You can put a text box on the report, and as the source of the text box go:


=([Filter])

It will display the filter.....

You could also pass the string in the open args paramter for the openReport,
and then for you text box data source go:

=([OpenArgs])
 

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