ActiveX headache

T

TheDewster74

I had crafted an ActiveX control in VB6, embedded in an Microsoft
Office 2k3 database. It worked great. Now I'm getting a problem with
the "onmousedown"... access is telling me that property is not
available to embedded form activex controls.

What hoops do I need to jump through to get the form to recognize the
onmousedown event? If I import the form from a working MDB to a fresh
MDB, the functionality is gone, even though the code is there. It's
as though the event isn't triggering anymore.

Dan
 
W

Wolfgang Kais

Hello Dan.
I had crafted an ActiveX control in VB6, embedded in an Microsoft
Office 2k3 database. It worked great. Now I'm getting a problem with
the "onmousedown"... access is telling me that property is not
available to embedded form activex controls.

How is Access "telling" you that?
What hoops do I need to jump through to get the form to recognize
the onmousedown event? If I import the form from a working MDB to
a fresh MDB, the functionality is gone, even though the code is there.
It's as though the event isn't triggering anymore.

First: when importing the form to a new mdb, did you add a reference
to the ActiveX control?
Then: Does your ActiveX control fire a mousedown event at all? If so:
Define a WithEvents variable at the forms level, store a reference to
your ActiveX control in that variable in the Load event of the form.
Set the variable to Nothing in the Unload event of the form.
Create an event procedure for the mousedown event of "the variable"
using the drop down boxes at the top of the code window.
 
A

Arvin Meyer [MVP]

I had crafted an ActiveX control in VB6, embedded in an Microsoft
Office 2k3 database. It worked great. Now I'm getting a problem with
the "onmousedown"... access is telling me that property is not
available to embedded form activex controls.

What hoops do I need to jump through to get the form to recognize the
onmousedown event? If I import the form from a working MDB to a fresh
MDB, the functionality is gone, even though the code is there. It's
as though the event isn't triggering anymore.

Dan

Perhaps your reference needs to be rebuilt. Or you may need to re-register
your ActiveX control. To do that:

Start >>> Run

then type:

regsvr32.exe "C:\The full path to your control.ocx"

and press enter. You should get a message back that the registration has
succeeded. Then reset the reference.
 

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