ActiveX on Access forms

L

Luke Bellamy

Hi - If I place an ActiveX control on a form (and them remove
the reference that gets added in the VBA references - so I don't
get a missing reference) will it cause problems if the ocx file is located
in my C:\Product Dir but on a users machine the ocx it is installed
somewhere different like C:\Program Files\Product?

I install and register the ocx in my wise installation package
but some users complain the form with the ActiveX control
will not open. Seems to be registered OK in the registry. So
the only thing I can come up with is that it has something to do
with where the ocx file is when I create the control on my access
form.

Any comments appreciated.

Thanks,
Luke
 
D

Douglas J Steele

You can't remove the reference if you're using the control. Your application
simply won't compile.

Why would you install the OCX in a different place on the user's machine
than on the development machine?
 
L

Luke Bellamy

Hi Doug - If I create my own ocx and use the list of ActiveX controls to
place it on a form it will automatically place an entry in the VBA
references
to a path like D:\MyOcxProject\MyActiveX.ocx.
I'm then simply responding to events of the control and calling method on it
by name assigned on the form. So I figured I did not need it in the
references
and had been compiling fine (although it might be deep down why I'm having
this problem when opening the form).
Could this have something to do with the form not opening now and again
on another machine even though it works 99% of the time?

As for the ocx location, my windows folder is C:\WinNT and others users
might
be C:\Windows. Or I may want to put the ocx in the program files they have
on
C or D drive. So the ocx could be installed in a different location on any
client
machine depending on there setup. Last year someone had windows installed on
E drive.

Thanks Doug
Luke,
 
L

Luke Bellamy

OK so I've read your web page about references and understand
that I can just place it in in the same folder as the mde or system32 and
it will find it OK.
I still don't understand though how it can compile and function correctly
so many other times when I don't have the ocx in the references list.
I don't see the need for it (which is why I took it out) because I'm never
creating or referring to constanrs etc provided in the ocx directly. The
access form creates an instance of it and I just called
meActiveX1.doStuff().
And that compiles fine without a reference.

Luke
 

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