Simplest might be to add a Find button to the main form.
Set the command button's On Click property to:
[Event Procedure]
Click the Build button (...) beside this.
Access opens the Code window.
Add these 2 lines to the event procedure:
Private Sub cmdFind_Click()
Me.[YourNameFieldHere].SetFocus
RunCommand acCmdFind
End Sub
It works because focus moves back to the main form when you click the
button, and then the code sets focus to whatever your name field is called
and calls the Find dialog.
If you set the Caption of the button to:
&Find
you can use Alt+F to jump to the button, so no mouse click is required.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Hans Karman" <ha**@karman.au.com> wrote in message
news:41********@news.comindico.com.au...
I have a form (giving details of a person) and a subform (giving details of
the person's assets).
A search in the form for a particular name using the Find dialog box finds
the wanted person.
The assets are then updated and the next person's name entered into the
Find
dialog box, but this fails to find the required name, because the focus is
still in the subform. The user thus has to first place the cursor into
the
form and then execute the Find. This is a general nuisance.
I have tried many ways of setting the focus back to the Main form, without
success, so the user's next Find will address the right records. Does
anyone know of a way to do this? I can't even find a SendKeys way of
doing
it (I would prefer not to anyway).
Hans Karman, Canberra Australia