A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ActiveX headache



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2008, 10:03 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 1
Default ActiveX headache

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
  #2  
Old April 11th, 2008, 12:28 AM posted to microsoft.public.access.forms
Wolfgang Kais[_3_]
external usenet poster
 
Posts: 68
Default ActiveX headache

Hello Dan.

Dan " wrote:
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.

--
Regards,
Wolfgang


  #3  
Old April 11th, 2008, 04:04 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default ActiveX headache

wrote in message
...
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.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.