Solved

Runnig a Access Macro in VB without Access on the client's computer

Posted on 2000-03-22
4
173 Views
Last Modified: 2010-05-02
Hi,

  I need to execute an Access macro from my VB program but the client doesn't have Access installed on its computer. So I can't do:
"dim objAccess as new access.application".
 Is there an other way to run a macro or I really have to run it on a computer that has  MS Access?

thanx
0
Comment
Question by:Fabulous
  • 2
4 Comments
 
LVL 17

Expert Comment

by:calacuccia
ID: 2647251
Hi Fabulous,

That will depend on what the Macro is doing. First of all, you'll ahve to store the macro in another place. Secondary, if you have access specific commands in it, it will not work. If you post the important part of the code here, that would help in determining if it can work or not.

Calacuccia
0
 

Author Comment

by:Fabulous
ID: 2649184
Calacuccia:

Here is the macro, I saved it in VB code:
DoCmd.TransferText acImportFixed, "Order Import Specification", "CLIENTS_ORDER", "E:\Consulting\orders.txt", False, ""

This macro is transfering a text file's information (Using specification) into a table (CLIENTS_ORDER).

Can I use this macro on a computer that doesn't have Access installed? If I create a MDE file with my db, will it work?
0
 
LVL 5

Accepted Solution

by:
Voodooman earned 50 total points
ID: 2650420
You cant run Access Macros modules from VB.

Microsoft say you cant so I guess you cant!

Write the import in VB using a data control setup as a text driver.

You then get a record set you can work with to do an import.


This works but you have to do some work!!

Voodooman!
0
 

Author Comment

by:Fabulous
ID: 2650767
I hoped I could have done something with the macro but... Thank you.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

860 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