?
Solved

MS ACCESS Module

Posted on 2011-05-03
12
Medium Priority
?
254 Views
Last Modified: 2012-05-11
I currently have a macro setup in Access 2007.  What I would like to do is use this macro but before the changes are made, import a file from a network drive.  I'm not sure if that has to be done through a module.  How can I have the file automatically imported into access 2007 and then call on the macro in Access 2007?

Thank you
0
Comment
Question by:cbones
11 Comments
 
LVL 21
ID: 35517451
What Type of File?

Maybe TransferText or  TransferSpreadsheet
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 35517553
Switchboard Alternatives:

http://www.peterssoftware.com/abs.htm

Several here:

http://www.aadconsulting.com/swbds.html

btw ... I've have checked out all of the above swb's ... and they are all pretty cool in one way or another.


Easily create your own Windows-like custom menus. Everything you need is here - no code ... see this link:

http://www.jamiessoftware.tk/articles/menubars.html
       
Not sure it that article mentions it, but ... when you are in the Customize mode (dialog) ... if you hold down the Control key, you can drop and drag (ie, copy) menu items from one place to another ... handy for making a new menu that is similar another one.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35601231
<import a file from a network drive.>
Can you give us the details on this mysterious "File" please?
As TheHiTechCoach posted, this will all depend on the nature of this "File".

The issue with your request is that doing anything "Automatically" requires a great deal of foresight to consider all the contingencies.
If the import fails
If the import is done twice by accident, or for any other readon
If the import is missed (skipped, bypassed, ...etc)
If the import contains invalid data
...etc

Further complicating things is that you are using macros.

To allow for all of the factors above, you really need to move to using VBA where error handling is more robust.

But in the most basic sense you would use TransferText or  TransferSpreadsheet as TheHiTechCoach suggested, then run your macro.

But in reality you need a function to determine the state of the Import (Run successfully, failed, run twice, skipped, ...etc)
Then run the macro only when the import is successful.
And possibly provide some feed back on the import status
(this will be a bit more complicated)

JeffCoachman



0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35601999
0
 
LVL 75
ID: 35666996
ooooopppppss !
Yikes.  Thanks Jeff.. Done.

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35690400
cbones,

Did you select the correct post as the answer?
0
 
LVL 75
ID: 35691251
lol.  no, the OP did not.  I will hit RA.
0
 

Author Comment

by:cbones
ID: 35691514
Yes,  one of his websites ended up leading me to my answer.

Thank you.
0
 
LVL 75
ID: 35691539
But my post had nothing to do with this Q.  Just curious then what you found ?

mx
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35693549
MX,

You know me, I won't take points out of your mouth...

;-)

Jeff
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35693558
...so if your post "accidentally" solved the issue...

...take the points and run...

;-)

Jeff
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question