PDA

View Full Version : Mousedown in form not triggering



gregl
11-20-2008, 04:25 PM
I want to trigger an event if the mouse is clicked anywhere on a form (including rectangle controls - but return co-ordinates relative to the form origin). This seems pretty straight forward, but it does not seem to work in access - surely I must be doing something wrong?? The code I am using is:

Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MsgBox ("mouse coordinates are X:" & X & " ,Y:" & Y)
End Sub