PC Review


Reply
Thread Tools Rate Thread

Access Coding Question

 
 
EAB1977
Guest
Posts: n/a
 
      31st Dec 2008
Hello everyone,

What I am attempting to do is to run a macro on a database that I
created. I can run this just fine since I have the full MS Access
version on my PC, but when I go to others machines that have the
runtime versions, they cannot run it. I get a ActiveX object error. I
have the Access Object Libaray(sp) checked in my References.

Has anyone ran into the problem before, and if so, what was your
workaround?

Sub TestMacro()
Dim appAccess As New Access.Application

appAccess.OpenCurrentDatabase "C:\myDB.mdb"
appAccess.DoCmd.RunMacro "macDoFirst"
appAccess.CloseCurrentDatabase
Set appAccess = Nothing

End Sub
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      31st Dec 2008
Did you post this in the Access NG also? They would probably have more
knowledge of the problem.

"EAB1977" wrote:

> Hello everyone,
>
> What I am attempting to do is to run a macro on a database that I
> created. I can run this just fine since I have the full MS Access
> version on my PC, but when I go to others machines that have the
> runtime versions, they cannot run it. I get a ActiveX object error. I
> have the Access Object Libaray(sp) checked in my References.
>
> Has anyone ran into the problem before, and if so, what was your
> workaround?
>
> Sub TestMacro()
> Dim appAccess As New Access.Application
>
> appAccess.OpenCurrentDatabase "C:\myDB.mdb"
> appAccess.DoCmd.RunMacro "macDoFirst"
> appAccess.CloseCurrentDatabase
> Set appAccess = Nothing
>
> End Sub
>

 
Reply With Quote
 
Kenneth Hobson
Guest
Posts: n/a
 
      1st Jan 2009
Download the MDAC files so that you can install it for them.
http://www.microsoft.com/downloads/d...DisplayLang=en

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Form coding question Energy40 Microsoft Access Form Coding 0 5th Aug 2011 04:24 PM
Re: Access-to-Excel Automation, Coding Question mcescher Microsoft Access VBA Modules 0 6th Dec 2006 07:31 PM
Need HTML/Access Coding Guru for Question =?Utf-8?B?Uml4?= Microsoft Access Form Coding 4 12th Sep 2006 01:36 PM
Question about Access coding practice/process... ohaya Microsoft Access Form Coding 3 20th Apr 2004 10:38 AM
Problems with coding and coding question!! James Microsoft Access Form Coding 0 23rd Feb 2004 10:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:12 PM.