Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / ActiveX Controls / April 2004

Tip: Looking for answers? Try searching our database.

Activex mousemove events

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jules - 21 Apr 2004 18:21 GMT
Hi,

I've created a Treeview control that works fine on my
machine but when other PCs load the form they get warning
popups saying that the event attached to Mouseup,
mousemove etc. do not result in a relevant macro name etc.
And once it's happened once it doesn't happen again until
re-loading the form.

The problem is that there aren't even any events attached
to mouse movements!

Anyone know what is going on?
Alex Dybenko - 21 Apr 2004 18:39 GMT
check that you have same OCX file version of both PCs

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hi,
>
[quoted text clipped - 9 lines]
>
> Anyone know what is going on?
Paul Johnson - 22 Apr 2004 03:18 GMT
Another thing to look at (thanks to Alex for steering me in the right
direction last week!) is that the other events for that control must be
coded exactly right.  I had exactly the same problem, and it stemmed from a
sub that I typed in according to the description in VB Help for the treeview
control:

Private Sub xtree_KeyDown(KeyCode As Integer, Shift As Integer)

I couldn't for the life of me figure out why that sub wrecked the whole
control and brought on all the messages ("Procedure declaration does not
match event description of event or procedure having the same name") as you
have seen.  Alex suggested that I initiate the subs by going to the comboBox
in the upper left of my VB code window, select my control, and then select
the event from the comboBox on the right.  VBA started my subroutine thus:

Private Sub xtree_KeyDown(KeyCode As Integer, ByVal Shift As Integer)

Everything had fallen apart because my code didn't match the exact
description as Access wanted to see it. I'm not even sure the technical
reason the "ByVal" keyword needs to be there,  but when I put in the ByVal
reference to the Shift parameter, everything works.

The point is not that one can't type in the event subs, but to make sure
they match exactly, it's safest to take it from the IDE.

Look at the events you have written code for, cut out the text, and delete
the sub declaration (and the "End Sub").  Starting with the comboBoxes,
choose the event you want, and paste your code back in between the Private
Sub... declaration and End Sub. You'll probably notice some tiny difference
from the declaration line you deleted.

I hope this helps.  My hat's off to Mr. Dybenko for getting me straightened
out on it!
Paul Johnson

> check that you have same OCX file version of both PCs
>
[quoted text clipped - 11 lines]
> >
> > Anyone know what is going on?
Jules - 22 Apr 2004 14:00 GMT
Thx- I'll give give this a try...

>-----Original Message-----
>Another thing to look at (thanks to Alex for steering me in the right
[quoted text clipped - 49 lines]
>
>.
Alex Dybenko - 22 Apr 2004 14:41 GMT
Thanks Paul :-))

> Another thing to look at (thanks to Alex for steering me in the right
> direction last week!) is that the other events for that control must be
[quoted text clipped - 46 lines]
> > >
> > > Anyone know what is going on?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.