Find Record in Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am using Access 2002. I have a main for that displays my records of Bills,
the LC Number, etc. When I click on the Find button, and look for a record on
the main form, it works fine. No problem if the fields are on the main form.

Now, for each main form, I have a subform that displays its Shipment details
(with a field called Invoice No.). Each Bill will have one or more Shipment.
If I do a find while I am still on the main form, to look for Invoice No.,
which is a field in the subform, I will not be able to find such record. It
will work if I enter into the Shipment subform and key in the Invoice No. But
the problem is users will not know where that particular Invoice No. resides.
So if I could do a search for the Invoice No. while on the main form, it
would be better.

So the question is, how do I seach for a record in the subform, while I am
still at the main form?

Appreciate any help.

Shalyn
 
So you need to filter the main form so that it contains only those bills
that have the desired invoice number in the subform. The user can then flick
through the main form records quickly, to find the right one in the subform.

See:
Filter a Form on a Field in a Subform
at:
http://allenbrowne.com/ser-28.html
 
Thanks Allen for your response. I tried that before I posted my question,
based on the question another person wrote in.

But for this solution, it creates a form header which I do not want. I would
wnat it to be as stright forward as with the Find control button already
provided by Access, to extend the search to a subform.

Shalyn
 
You cannot use the Find dialog, because the record is not in the subform to
find.

It is not there until you locate the right record(s) in the main form, so
you will need to use code to do that. If you prefer the interface, you can
create a small unbound pop-up form instead of a control in the form header,
and use similar code to find the right record(s) in the main form, and then
find in the subform.
 
Back
Top