The purpose of a command button is to perform some function, usually in the
buttons click event. Are you trying to achieve this same functionality, but
with the mouse over event?
Not understanding why you want to do this, the way I would approach it is to
create a public variable to store some status (bEnableMouseOver). You might
also need a variable to store the time (I'd make this a variant so you can
store a Null or Timer value) when you first mouseover the button, if you
don't want to fire the event until . I would set it bEnableMouseOver to True
when the form loads. Then, when you mouse over the control, I would check to
see whether this value is true or false. If false, the form is already open.
If true, I would check to see if the timer variable is NULL. If so, I would
set it. If it is not null, I would check to see whether the difference
between the current Timer() function and the varTimer variable is greater
than the time you want to evaluate. If it is, I'd set bEnableMouseOver to
false, and open the form.
The thing about this is that if you do this, then you also have to put some
code in the forms mouseover control, so that you can reset varTimer and
bEnableMouseOver whenever the cursor moves off of the command buttons.
Seems like a lot of work to enable a functionality that already exists with
a click. Besides, what if your user bumps the mouse and accidentally moves
the cursor over the control?
--
HTH
Dale
Don''t forget to rate the post if it was helpful!
email address is invalid
Please reply to newsgroup only.