MouseUp events in ActiveX Controls

  • Thread starter Thread starter daspafford
  • Start date Start date
D

daspafford

Guest
Hi All,
I am using both TreeViews and ListViews (version 6.0) in Access. Despite my best efforts, I am unable to form MouseUp events in either, I assume it is a common problem with ActiveX controls as the KeyUp, KeyDown events etc. also do not work.

I have put a ListView named ListView0 on a form and entered the following in the VBA editor:

Private Sub ListView0_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
MsgBox "okay"
End Sub


Upon compiling, I get the error message "Procedure declaration does not match description of event or procedure having the same name". Ie. this event does indeed exist as described in the Object Inspector (F2) and also in the msdn.microsoft.com pages. Can anyone enlighten me as to what is going wrong please?

Many thanks,
Dave
 
Found the answer suddenly after 4months!

Hi all,
I have found the answer to my own question. If any of you need the answer, you need to prefix the arguments with ByVal which I forgot. If you're not sure, then just open the forms class module, in the upper left combo box, select your control and then in the upper right combo box select the event and access will insert the event procedure for you!
Woo hoo
Dave
 

Users who are viewing this thread

Back
Top Bottom