On Tue, 06 Jan 2004 05:06:00 GMT, "Mark" <mm*****@earthl ink.net> wrote:
I have autorepeat turned on for a command button that increments the value in a
textbox. When I click on the button and hold the mouse button down, the value in
the textbox does not change. When I release the mouse button, the value in the
textbox changes to where it incremented depending on the length of time I held
the mouse button down. How do I make the value "spin" in the textbox while I
hold the mouse button down?
Thanks!
Mark
Form performance reasons, Access does not update the display while a VBA
function is executing. You can force it to update the display by calling the
..Repaint method of the form.
Also, using a button for a spin control is annoying for 2 reasons. First, the
button takes the focus away from the control being "spun", which is hard to
get arouns. Second, the button border is too fat for such a small button. A
better thing to use is an Image or Label control. Either of these control
types can receive mouse events without tking the focus away from the control
being spun. Unfortunately, I don't think you can use auto-repeat with these
controls, so you have to use a timer even to spin while the mouse button is
down on the spinner.