I want to prevent users from clicking ahead on some forms until some processes are finished. I know the keyboard can store keystrokes so I want to basically intercept and do something with these keys or cancel the keystroke event. I want the same for the mouse events.
The problem is actually on a VB form but Access is part of the project so it is affecting the whole project.
Jim clicks on the Start Process button with the mouse or enter key or hotkey. Jim wants to click ahead to restart the process when the first one completes - I want to trap that click and discard it until I am ready to let Jim press or click the button once again.
I find that even if I disable the button temporarily, as soon as I re-enable it the button is clicked from the stored mouse or keystroke.
I'm sure this is an easy one - I just haven't done keypress and mouse events for a while and don't want to spend 3 hours figuring this out.
you can enable a button but first SetFocus to something else
Private Sub Command13_Click()
me.text1.SetFocus ' < must do this
Command13.Enabled = False
do next thing
Command13.Enabled = True
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
Tried enable disable (but I didn't change the focus - maybe that might help prevent extra keystrokes falling on the button once re-enabled.) As far as the keypress usage - could you give me a little more info on this. Thanks.