Show search results within form + drill down to detail form




I would appreciate some guidance as to whether the following is achievable
in Access and if so, what the best approach would be to achieve it;

I want to provide a search form to my users, something very basic that
allows them to filter by a date range. The user enters a date range and
clicks the search button. Access then shows the results of that search
either on the search form or a separate search results form. The user can
then review the results and double click one to drill down to a another form
showing the detail of that record which they can then modify.

I have got two ideas to achieve this.
1. A multi column list box to display the search results in.
2. A subreport control.

For point 1, the main problem is the list control does not support word
wrap. In the case of point 2, it sounds like the more preferable approach
because I could have flexible layouts but I haven't a clue how to run a
subreport or implement a "drill down" if the user clicks a row in it.

Many thanks in advance!!


Allen Browne

A simple interface might be a form in continuous view (show it shows one
record per row.) You place the search boxes in the Form Header, and apply a
filter to the form. Here's an example of how it's done (including a date
range, as well as other filter options):
Search form - Handle many optional criteria

Once you get that working, it is quite easy to open another form and load
the current record. The code would be like this:
DoCmd.OpenForm "Form2", WhereCondition:= "ID = " & Me.ID

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