By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Access with Activex dll

P: n/a
Hi,

On the project I am working on we need to encapsulate all data and business
logic in an activex dll. My question is: How do I do this? How can I
access the form objects ie text boxes, buttons with a dll?

Thanks.
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"rufus" <he***@online.de> wrote in message news:ch**********@online.de...
Hi,

On the project I am working on we need to encapsulate all data and business logic in an activex dll. My question is: How do I do this? How can I
access the form objects ie text boxes, buttons with a dll?

Thanks.

Or to put this another way, how can I move the code from my class modules
into an Activex object OR export it as an activex dll?
Nov 13 '05 #2

P: n/a
Hi, Rufus.
On the project I am working on we need to encapsulate all data and business
logic in an activex dll. My question is: How do I do this? How can I
access the form objects ie text boxes, buttons with a dll?


Don't try to do this. It's like pushing on a string. Microsoft Access
database applications are not designed to be accessed _from_ *.DLL's.
Microsoft Access database applications are designed to _use_ these
libraries, instead. Access objects, even if they have the same name as VB
objects, such as "Form," are different objects, often with different
Properties, methods and behaviors.

For example, the "only" control on an open Form is the ActiveControl, which
is the control with the focus. All other controls are "painted on" the form
with pixels in order to save memory. It's pretty hard for an exterior
process to access the other controls on the Form when there's no Windows
handle to reach them.
how can I move the code from my class modules
into an Activex object OR export it as an activex dll?

You can encapsulate code from your class modules in a *.DLL that your
database application can call at run-time. Just open the modules and export
them as text files to be imported into a VB project and compiled with your
Visual Basic compiler. You may need to modify some of the code, because VB
is not identical to VBA, but they are pretty close. If you use any other
programming language for your *.DLL, then you will have to do a major
rewrite of your code.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
"rufus" <he***@online.de> wrote in message news:ch**********@online.de...
"rufus" <he***@online.de> wrote in message news:ch**********@online.de...
Hi,

On the project I am working on we need to encapsulate all data and

business
logic in an activex dll. My question is: How do I do this? How can I
access the form objects ie text boxes, buttons with a dll?

Thanks.

Or to put this another way, how can I move the code from my class modules
into an Activex object OR export it as an activex dll?

Nov 13 '05 #3

P: n/a

"'69 Camaro" <Fo**************************@Spameater.orgZERO_SP AM> wrote in
message news:dmK_c.2256$x12.1040@trnddc05...
Hi, Rufus.
On the project I am working on we need to encapsulate all data and business
logic in an activex dll. My question is: How do I do this? How can I access the form objects ie text boxes, buttons with a dll?


Don't try to do this. It's like pushing on a string. Microsoft Access
database applications are not designed to be accessed _from_ *.DLL's.
Microsoft Access database applications are designed to _use_ these
libraries, instead. Access objects, even if they have the same name as VB
objects, such as "Form," are different objects, often with different
Properties, methods and behaviors.

For example, the "only" control on an open Form is the ActiveControl,

which is the control with the focus. All other controls are "painted on" the form with pixels in order to save memory. It's pretty hard for an exterior
process to access the other controls on the Form when there's no Windows
handle to reach them.


That is what I was afraid of. 'The project I am working on requires a
'controller' to sit between andMS Access application, vb.net application and
the database. The idea is that the vb.net application and the MS Access
application send the same calls to the controller and then the controller
reacts depending on whether Access or VB.NET are calling the functions. I
am beginning to think this is impossible because of the different
programming interface inherent in both.

Thanks for your help anyway.
Nov 13 '05 #4

P: n/a
"rufus" <he***@online.de> wrote:
That is what I was afraid of. 'The project I am working on requires a
'controller' to sit between andMS Access application, vb.net application and
the database. The idea is that the vb.net application and the MS Access
application send the same calls to the controller and then the controller
reacts depending on whether Access or VB.NET are calling the functions. I
am beginning to think this is impossible because of the different
programming interface inherent in both.


You can do this. But you are not using the full power of bound forms, subforms and
continuous forms. As this then is going to be more work anyhow you might as well
write the GUI in VB or VB.Net.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.