Solved

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

Posted on 2000-03-22
4
170 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now