Can I compile module to DLL ?

G

Guest

I have several Access applications with module containing utility functions.
e.g. To test if a field is empty. I use
Public Function FieldEmpty(f) as Boolean
FieldEmpty = iif(isNull(f) or isMissing(f), true, false)
End Function

The problem is the code is copy and paste from an application to the next.

Is it possible to call a module from another mdb or compile the VBA module
into a DLL so all application shared the same code ?

Thx in advance for any help.
 
P

Pieter Wijnen

The simplest (?) way is to put all the common code in a mde & Add a
reference to it in other databases

Pieter
 
T

Tony Toews [MVP]

Mui May said:
Is it possible to call a module from another mdb

Yes, but it can be troublesome at times. See my Add-in Tips, Hints
and Gotchas page at http://www.granite.ab.ca/access/addins.htm
or compile the VBA module
into a DLL

You could do this using VB 6 however it would be more troublesome if
you had lots of Access forms which you'd have to convert to VB6 forms,
etc, etc. Combo boxes and list boxes work much poorer in VB 6. And
continuous forms require an external OCX/Actives control which is a
PITA given versioning and distribution problems.

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
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
M

Minton M

Yes, but it can be troublesome at times. See my Add-in Tips, Hints
and Gotchas page athttp://www.granite.ab.ca/access/addins.htm


You could do this using VB 6 however it would be more troublesome if
you had lots of Access forms which you'd have to convert to VB6 forms,
etc, etc. Combo boxes and list boxes work much poorer in VB 6. And
continuous forms require an external OCX/Actives control which is a
PITA given versioning and distribution problems.

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 athttp://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

I'm with Tony - use VB to create a DLL and go from there if you're
looking to centralize helper functions. It's got to be simpler and
less error-prone.
 

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