Set Focus to field with certain contents?

davea300

Registered User.
Local time
Today, 19:44
Joined
Mar 16, 2007
Messages
164
Hi

I have a command button that requeries a subform (continuous form) and deletes records depending on the content of certain fields. This works fine.

After this I want to set the focus to a field [Relationship] on the record where Relationship = MainApplicant (there will only be one record where this is true).

So far I have used:

Me.frmAdultDetails2.Relationship.SetFocus

but this sets the focus to the first record in the subform (as it should). What should I add to this code to set the focus to the record where Relationship = MainApplicant?

Thanks
 
Add a loop after the setfocus line that moves to the next record until Relationship = MainApplicant
 

Users who are viewing this thread

Back
Top Bottom