
Originally Posted by
Bigdoggit
I would like to stop a person from doing anything on the form while to SQL statement is executed
the way I see it, you can do it a number of ways. First of all, which is probably not known to many, there is API code to block the keyboard and mouse:
Code:
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
To BLOCK, the arg is 1, to UNBLOCK the arg is 0. and of course, the return values of the function are also 0 and 1 indicating what the status of the hardware items are.
and then course another way to do it, which requires less care, is simply to popup a modal for with a stopwatch function or something to show them that the code is running, and close it at the end of the execution.
Modal forms disallow users to manipulate windows below that one, so that's probably easiest.