Posted on 2011-02-23
I have a search form
After I enter in the criteria I see a list of records.
I want to be able to tab down to the first record, hit enter and then the code will fire to open up the other form.
I thought I could use the event "On Enter" but it seems to fire "On Open" of teh form.
When I open the form, the form immediately fires the On Enter macro and I did not even hit enter.
I also tried ON Focus but same thing. I have to shutdown db in order to stop the code as it seems to loop indefinitely.
What other method can I use? Right now, I use the On click event of the field I am clicking to fire the open form code but it takes time to grab the mouse and then click that particular field. It would be quicker to hit tab and then press enter.
the setup is main form then subform. The sub is where I am setting the On Enter. On the main form I have setfocus to the search box.