Mouse Click and Ctrl to activate Command Button

B

Banaticus

From http://support.microsoft.com/?kbid=209984
Private Sub ExitMicrosoftAccess_MouseDown(Button As Integer, Shift _ As
Integer, X As Single, Y As Single)
If Shift And acCtrlMask Then
DoCmd.Close
End If
End Sub
What's this "If Shift"? Where's this Shift come from and how does the Sub
get the acCtrlMask variable?
 
D

Douglas J Steele

From the Help file:

Shift

The state of the SHIFT, CTRL, and ALT keys when the button specified by the
Button argument was pressed or released. If you need to test for the Shift
argument, you can use one of the following intrinsic constants as bit masks:

Constant Description
acShiftMask The bit mask for the SHIFT key.
acCtrlMask The bit mask for the CTRL key.
acAltMask The bit mask for the ALT key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top