General information
Category:
Coding, syntax & commands
Hi Andrew...
I have been looking for the code for something I did which solved the exact same problem. Bear with me while I explain, but I do not have an example.
I created a form.method called 'focuschanger'. I used this especially with grids in mind. From cmdButton.click() I put in a call to form.focuschanger(thisobjectname, gridobjectname).
In the focuschanger, I called the thisobjectname.lostfocus (this kills the original click event), then I called gridobjectname.setfocus (reassigning focus).
I am still looking for the exact code, but I think you get the idea. I have asked the 'click' and 'enter' question before, but have not received a reply. I hope you can pick up on this and use it. HTH
Ric
>I wonder if anybody has seen this before...
>
>I have a grid contained in a container. Also contained in the container is a command button. The click event of the command button adds a new record to the recordsource of the grid, after which it calls the SetFocus of the textbox in the first column of the grid.
>
>The first time I invoke this code, the textbox gets focus as expected. However, subsequent invocations result in the focus remaining on the calling command button.
>
>Has anybody seen anything like this before? Any suggestions?
>
>Thanks in advance.
>
>Andrew
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only