Search Several Subforms (1 Viewer)

Joshann

Registered User.
Local time
Today, 02:36
Joined
Mar 22, 2002
Messages
142
I have a main form with several subforms. What I would like the user to be able to do is basically build a search string with as many fields from the Main Form and Subforms as he/she wants and then display the results. I can't decide what would be the best way to do this. Here are the contents of the forms:

frmEntities (Main Form)
EntityID
EntityName
TaxID
DateRecd

frmContacts (Subform)
ContactID
EntityID (FK)
ContactName

frmFacilities (Subform)
FacilityID
EntityID (FK)
FacilityName
Address

frmPermitNumbers (Subform)
PermitNumberID
EntityID (FK)
PermitNumber

The search form would have text fields something like this:
Entity Name:
Tax ID:
Date Received:
Contact Name:
Facility Name:
Address:
Permit Number:

So the user could fill in any or all of the search fields. For example, if the user enters an Entity Name, a Facility Name, and a Contact Name, the search would find the records where the Entity Name entered equals frmEntities!EntityName AND the Facility Name entered equals frmFacilities!FacilityName, AND the Contact Name entered equals frmContacts!ContactName.

Does anyone have any suggestions?
 

Users who are viewing this thread

Top Bottom