[AccessD] Can a .VBS fire up a .ACCDR?

Brad Marks BradM at blackforestltd.com
Tue Jul 13 14:02:00 CDT 2010


Below is the code in the VBS Script. 

Sorry, I should have posted this when I first posted the question.

Brad

'~~~~~~~~~~~~~~~~~~~~~~~~~~

DIM accessApp

set accessApp = createObject("Access.Application")

accessApp.OpenCurrentDataBase("C:\Access_Test\Test.accdr")

accessApp.Run "Sub_Name"  'Name of VBA Sub to initiate within the
database  

accessApp.Quit 

set accessApp = nothing

'~~~~~~~~~~~~~~~~~~~~~~~~~~


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy
Sent: Tuesday, July 13, 2010 1:53 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Can a .VBS fire up a .ACCDR?

Possibly you should change your script to use the command line constants
to
open the .accdb file in runtime mode. I have not done in 2007 but have
done
in earlier versions. Access 2007 continually amazes me with what doesn't
work as it is supposed to.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Tuesday, July 13, 2010 11:02 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Can a .VBS fire up a .ACCDR?

Yes, Access lives on the machine.

Here is what we did...

Copied test.accdb to test.accdr (in the same folder)

Changed one byte in the .VBS Script to point at test.accdr rather than
test.accdb

Everything works fine with the accdb file, but not so with the accdr
file.

Brad


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy
Sent: Tuesday, July 13, 2010 12:03 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Can a .VBS fire up a .ACCDR?

Does Access exist on the machine? ACCDR just opens the file in runtime
mode
as I understand. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Tuesday, July 13, 2010 9:47 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Can a .VBS fire up a .ACCDR?

We have a number of .VBS scripts that we use to initiate various modules
in
Access 2007 .ACCDB files.  This works nicely.

Now we would like to use a .VBS to initiate a .ACCDR.

Is this possible?

When we try this, we receive an error message stating that Microsoft
Access
cannot find the database.

This seems like it should be really simple.  We must be missing
something.

Thanks,
Brad
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





More information about the AccessD mailing list