473,325 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Importing module?

Hi

I've got a mdb that is recreated monthly/weekly.

I've written a bas module with lots of functions in it so that they
can be used in queries.

What is an easy way to import the bas module into the newly created
mdb. I've exported it as a text file.

There does not seem to be a method of importing the file. The only way
is to insert a new module then insert file and selected the file I
previously exported.

Thanks
Jan 21 '08 #1
3 6989
Yitzak wrote:
Hi

I've got a mdb that is recreated monthly/weekly.

I've written a bas module with lots of functions in it so that they
can be used in queries.

What is an easy way to import the bas module into the newly created
mdb. I've exported it as a text file.

There does not seem to be a method of importing the file. The only way
is to insert a new module then insert file and selected the file I
previously exported.

Thanks
File/GetExternalData/Import (select mdb to import from), click Import,
then select the module and press OK.

JPGR
http://www.youtube.com/watch?v=QvlVBopw-co
Jan 21 '08 #2
"Yitzak" <te*********@yahoo.co.ukwrote
I've got a mdb that is recreated monthly/weekly.
If you'd explain what you have, what you are trying to accomplish, and why
you felt it necessary to re-create weekly and/or monthly a database into
which you have to copy a module, perhaps someone can offer you useful
suggestions. My comment would be, perhaps you have an exception, but there
is almost never a compelling reason to re-create a similar database on a
periodic basis.
I've written a bas module with lots of functions
in it so that they can be used in queries.

What is an easy way to import the bas module
into the newly created mdb. I've exported it as
a text file.
If there is some compelling reason why you can't use Salad's suggestion of
importing the module directly from the database where it resides, then you
can open a new module in the new database, highlight, copy, and paste the
module code.

Larry Linson
Microsoft Access MVP
Jan 21 '08 #3
Thanks Salad. That did the trick.

Larry the DB is re-created with new products from an external source.
To be honest I really don't wanna get into this area - can of worms,
probably doesn't need to.

Out of interest how does one share vba code around, i.e. say I have a
couple of BAS modules with lots of useful routines. Linking seems to
work only with tables? Import just SEEMS to copy the bas module over

What I'm trying to achieve here is in case of code fix, I don't have
to change every DB that references it. But change the one that all
others "link to".

Short of compiling it into a VB dll and referencing it in Access,
which still wouldn't be ideal, but would probably still need a bas
module as a wrapper to instaniate and wrapp teh calls to the dll.
Larry Linson wrote:
"Yitzak" <te*********@yahoo.co.ukwrote
I've got a mdb that is recreated monthly/weekly.

If you'd explain what you have, what you are trying to accomplish, and why
you felt it necessary to re-create weekly and/or monthly a database into
which you have to copy a module, perhaps someone can offer you useful
suggestions. My comment would be, perhaps you have an exception, but there
is almost never a compelling reason to re-create a similar database on a
periodic basis.
I've written a bas module with lots of functions
in it so that they can be used in queries.
>
What is an easy way to import the bas module
into the newly created mdb. I've exported it as
a text file.

If there is some compelling reason why you can't use Salad's suggestion of
importing the module directly from the database where it resides, then you
can open a new module in the new database, highlight, copy, and paste the
module code.

Larry Linson
Microsoft Access MVP
Jan 23 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: plb | last post by:
All: I am struggling with an import problem... In my package, myapp, I have a module, logging.py. That module, naturally, imports the library module logging with an 'import logging'...
0
by: Mark English | last post by:
Basic problem: If there is a C-extension module in a package and it tries to import another python module in the same package without using the fully qualified path, the import fails. Config:...
12
by: qwweeeit | last post by:
The pythonic way of programming requires, as far as I know, to spread a big application in plenty of more manageable scripts, using import or from ... import to connect the various modules. In...
4
by: jean-marc | last post by:
As an application programmer, I'm not well versed in the material aspects of computing (memory, cpu, bus and all). My understanding of imports in Python is such: the __main__ program is the center...
0
by: David Christian | last post by:
Hello all, I've been working on a lazy import module to be found here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473888 The basic idea is that a module proxy for foo is returned...
4
by: rshepard | last post by:
I'm stymied by what should be a simple Python task: accessing the value of a variable assigned in one module from within a second module. I wonder if someone here can help clarify my thinking. I've...
2
by: warhero | last post by:
Hey all, sorry for the totally newb question. I recently switched over to python from ruby. I'm having problems figuring out how module importing works.. as a simple example I've got these files: ...
7
by: Hussein B | last post by:
Hey, Suppose I have a Python application consists of many modules (lets say it is a Django application). If all the modules files are importing sys module, how many times the sys module will be...
3
by: rs387 | last post by:
Hi, I've found the following behaviour on importing a variable from a module somewhat odd. The behaviour is identical in Python 2.5 and 3.0b2. In summary, here's what happens. I have a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.