Using find on a form with subforms

  • Thread starter Thread starter ktdid
  • Start date Start date
K

ktdid

Hello - In a db designed in Access 2000, I can not use the
Find feature in the subforms. If I click in the field and
get the find dialog box, after entering my selection, it
says it finished searching the records and the search item
was not found. The subform is set to a view of continuous
forms. In the find box, "Search fields as formatted" is
checked, but the result is the same either way. If anyone
can help, I'd appreciate it!
 
The subform contains only those records that match the main form. That is
probably the reason that your search finds nothing, i.e. the record you want
is not in the subform until you move to the right record in the main form.

If that's what is going on, you will need to provide an unbound text box
where the user can enter the value they want to find. In its AfterUpdate
event procedure, you will need to:
1) DLookup() the subform's table to find the value of the foreign key field.

2) FindFirst this value in the RecordsetClone of the main form, so the right
record gets loaded.

3) Now that the record is present, FindFirst the original value in the
RecordsetClone of the subform.
 
Back
Top