Tony Bansten said:
I have a *.mdb Access database which contains VBA code with a couple of
forms.
Can I somehow extract all the VBA code into an external file (or multiple
files)
and run the VB code from there (including forms and databases accesses of
cause) ?
You can move the code from a forms module into a standard code module (you
have to still call the code from the form). And, you can build a library of
code that you use,and place that code into a mde, and set a reference to
that mde, and thus run code in that external file. But, you can't just
wholesale remove the code out to a separate file.
So, you can use common "libraries" of code by placing that code in a mde and
as mentioned setting a reference to that mde.
And, to really answer your question, yes..you should and can remove all code
and forms from the database. This process is explained here:
http://www.members.shaw.ca/AlbertKallal/Articles/split/index.htm
For the most part, we don't place any code with the data. So, what you
supposed to do is extract all code + forms etc. OUT OF your data file. So,
your question makes sense in that regards. You need to use what is called a
split database....