Eric,
Private Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As
Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Sub BlockIt(lPeriod As Long)
'Blocks keyboard and mouse input events from reaching applications.
DoEvents 'Complete any pending operations first.
BlockInput True 'Block mouse and keyboard input.
Sleep lPeriod 'Wait <lPeriod>/1000 seconds before unblocking it.
BlockInput False 'Unblock the mouse and keyboard input.
End Sub
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html