I'm looking for a way to find which control on a form has the focus through visual basic (whatever version ships with Office 2000)
I basically have a form that links to a photo, and when someone is using the navigation buttons (I made, not the little ones at the bottom of a form) they can cause the DB to crash by pressing the button too quickly because Access needs time to load each image.
I wrote a function to disable the buttons, then the function to link the image runs, then a third function runs to enable the images. The problem is I would like to enable the buttons as if nothing had changed (ie, at the end of the enable function, it sets the focus to whatever button had it before the disable function ran)
Does anyone know a function that can determine which control has the focus?
Thanks
I basically have a form that links to a photo, and when someone is using the navigation buttons (I made, not the little ones at the bottom of a form) they can cause the DB to crash by pressing the button too quickly because Access needs time to load each image.
I wrote a function to disable the buttons, then the function to link the image runs, then a third function runs to enable the images. The problem is I would like to enable the buttons as if nothing had changed (ie, at the end of the enable function, it sets the focus to whatever button had it before the disable function ran)
Does anyone know a function that can determine which control has the focus?
Thanks