Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2000-03-22
4
Medium Priority
?
178 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 200 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

885 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