Searching subforms

  • Thread starter Thread starter cjstudioguy
  • Start date Start date
C

cjstudioguy

I'm sure this question has been asked and answered many
times, but I can't find it...so here it goes again.

I have a form (Customer, based on a "Customer" table) and
it contains a subform (Order - based on "order" table).

I can use the built in Find funtion to search for a
customer and view all their orders, no problem there.
But, I want to create a search that is run from the
switchboard where the user clicks "Search" and a small
dialog box pops up and they can enter an "OrderNumber"
and it will bring up that particular Order Subform along
with it's corresponding Customer info. I am having
trouble finding a way to search via Subform info.

Thanks!
 
Thanks for the help...I checked out the site, but I dont
have 3 tables. I only have 2 tables. A customer table
and an Order table. The main form is Customer and the
subform is Order. I don't know what he means by the
third table - "tblProductSupplier, a link table with
ProductID and SupplierID as foreign keys.".

His code uses tblProduct and tblProductSupplier and the
row source for the combo box is tblSupplier...so all 3
tables are apparently necessary for this to work. There
has to be a way to filter the main form based on a field
in the subform, preferably using just the two tables and
two forms that I already have.

Any suggestions?
Thanks
 
You don't need three tables to make it work. Consider the
tblProductSupplier to be the same as your Order table, and base your
combobox row source on the Orders table as well.
 
Back
Top