FindRecord

  • Thread starter Thread starter help
  • Start date Start date
H

help

I have a Find Record command button on a Main Form. I
also have a subform. When I click on the subform and then
choose Find Record it displays the item was not found
although I am looking in the subform. Is there any way to
fix this...TIA
 
help said:
I have a Find Record command button on a Main Form. I
also have a subform. When I click on the subform and then
choose Find Record it displays the item was not found
although I am looking in the subform. Is there any way to
fix this...TIA

Did you see my answer to your previous post on this subject? (At least,
I think it was your post, but since you don't name yourself, it's hard
to be sure.)
 
Hi, the fix for this didn't work. I am using the Find and
Replace but it only works for the Main Form. When I click
on the subform the Find states it is looking in the
subform but it doesn't find any records. My Find Record
is on the Main form, is there another way to get the Find
and Replace to work on the subform? Thanks again for your
help.
 
Hi, the fix for this didn't work. I am using the Find and
Replace but it only works for the Main Form. When I click
on the subform the Find states it is looking in the
subform but it doesn't find any records. My Find Record
is on the Main form, is there another way to get the Find
and Replace to work on the subform? Thanks again for your
help.

The fact that it says it's looking in the subform suggests that the
"fix" is working, at least as far as telling the Find/Replace dialog
what form to look in is concerned. I think it should work, so I wonder
if you're looking in the correct field or with the correct options set.
Did you look carefully at the dialog as it was displayed, to make sure
that it's searching the right field, and with the right "match" options?

Conceivably, you may want to set the focus to a specific control in the
subform before doing your search (though I'm kind of doubtful about
this). You might try adding yet another line before you call the
Find/Replace dialog. Instead of just

Me!NameOfSubformControl.SetFocus

you could write

Me!NameOfSubformControl.SetFocus
Me!NameOfControlOnSubform.SetFocus

and see if it makes a difference.

Failing all this, you could put your command button on the subform
itself; then you wouldn't have to move the focus to anything but the
control (on the subform) that you want to search.
 
Back
Top