Requery main form from command button

D

Diane

I have a command button on a form to search for a field in the form.

Private Sub Find_Record_Click()
On Error GoTo Err_Find_Record_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Find_Record_Click:
Exit Sub
Err_Find_Record_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Click

End Sub

When I get the record I need, how can I make the main form go directly to
that record? Now I have to note the autonumber and go back in the main form
and make a search for it.

Thanks for your help.
 

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

Similar Threads


Top