Hello there, 
I've a bit problem with my search feature and enter key. Ok, first of all I got one form wheres like subform that includes lots of fields etc, but nevermind those. I got search field in main form and button for that as well. I was just added feature, so when user define search criteria into text field and hits enter, program will automatically start searching matching records, but now user need to click that button to do that.
Below is a bit code what I'm using in search field keydown event:
Everything works fine, search will complete and program informs user if theres matching records or not, but then here's this bug. I focused search button earlier in text field keydown event and now I trying to focus back to that search field, but that just doesn't work. Search button just stays focused, no matter what I do.
So now I'll ask your advices and help with this.
All replies are approciated a lot.
Thanks for your time.

I've a bit problem with my search feature and enter key. Ok, first of all I got one form wheres like subform that includes lots of fields etc, but nevermind those. I got search field in main form and button for that as well. I was just added feature, so when user define search criteria into text field and hits enter, program will automatically start searching matching records, but now user need to click that button to do that.
Below is a bit code what I'm using in search field keydown event:
Code:
If Keycode = 13 then
Me.[cmd_Search].SetFocus
Call cmd_Search_Click
End If
Everything works fine, search will complete and program informs user if theres matching records or not, but then here's this bug. I focused search button earlier in text field keydown event and now I trying to focus back to that search field, but that just doesn't work. Search button just stays focused, no matter what I do.
So now I'll ask your advices and help with this.

All replies are approciated a lot.
Thanks for your time.
