Solved

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

Posted on 2000-03-22
4
176 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month3 days, 19 hours left to enroll

630 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