I have a text box that is used for filtering the form. You type a keyword in it, and click the "search" button, and the form is then filtered.

What I am trying to do is use the keydown even to trigger the search button by hitting enter rather than having to click the button.

This is what I have so far:

Private Sub SearchBox_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = 13 Then DoCmd.RunMacro "me.PR_Main:cmdGo:On Click"
End Sub
I think the above code would work if I got the macro name correct. The problem is, the search button has an embedded macro that is run when clicked. I have no idea what the name of this macro actually is since its not a standalone macro. I go tthe above name off the tab when the macro is open. Does anyone know how to call embedded macros?