Searching subform in ADP

G

Guest

I have an Access Data Project that has subforms in tab pages. That tab
control is in a form that is a subform of a main form. Using Ctrl-F on a form
in a tab page only searches records that are associated with the one record
in the hightest parent form. I would like to search every record of the
parent form for results in a control that is in a subform in the tab pages.

I've been looking at RecordsetClone.Find, but it has the same limitation as
using the Ctrl-F search window. I was thinking about creating a form as a
search window. What would be the best approach to creating a search function
for this? I'm guessing I have to somehow search based on the relationships of
the subforms to the main parent form, but can't figure this out.
 
G

Guest

It looks like I found the solution. I ended up doing a select query on the
table represented by the subform, getting the column that links to it's
parent form (the table's foreign key to it's parent table). I then queried
the table associated with that parent form, getting the column that links to
the highest parent form. I then did a RecordsetClone.Find on the highest
parent form based on that column value (which is the primary key of the table
associated with it). It seems to test well.
 

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