Searching a Main Form & Subform

G

Guest

I have created a main form which has two forms showing Trustee names and
address. So basically the main form could have and unlimited amount of
Trustee details.

What I want to be able to do from a search form is to be able to search by a
file number which is a record on the main form and also by the Trustee name
which is on the subform.

I have managed to do a standard search from a form but I am unsure of how to
search both a form and subform at the same.

I have looked through the message boards to find an answer but haven't come
across one, sorry if I have missed it.

Any help you could give will be appreciated.
 
A

Allen Browne

Depending on the relationships between your tables, you may be able to solve
the problem by creating a query that uses both tables. Base your search form
on that, and you have all the fields you want to to search on.

If that's not suitable, you can search the subform's table either by
changing the RecordSource of the main form so it includes the related table,
or by using a subquery in the main form's Filter. For the RecordSource
approach, see:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html
Or to learn about subqueries, see:
http://allenbrowne.com/subquery-01.html
 

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