Discussion Locked

Access97: From a Search to a Report

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a phone directory that when a search is executed for any word(s) I would lik eit to return all found results to a report, is this possible? If so, how? I only have a table, report and a search box in a form.

5 replies

by roc180

Easiest way is to take the criteria the user provided in the search box and create a Querydef that the report will use as its recordsource. If you need an example let me know and I can email one to you.

Neal Martinelli

by donq

In the Access Database window click the "Queries" tab and then click "New". Select "Design View" and OK from the New Query window. Double click on the Table containing whatever it is you wish to report on and then Close the Show Table window. Drag or double click on each field you want in your report. In the query column that contains the data you are searching on enter the following in the Criteria: space "[Forms].[,your table name here].[your search box name here]". Click the "Exclaimation mark" in the toolbar to run the query and manually enter a value from your search box to see if everything works. If so save and name your query, and base your report on it. Once your form is open the Criteria you entered above will automatically look-up whatever the user selects in your search box! Good Luck - Don Quigg

This discussion is closed to new replies.