VBS to run Access Mcr

jj72uk

Registered User.
Local time
Today, 01:49
Joined
May 19, 2009
Messages
65
Hi All,

Hope you can help me out here...

Currently I have a VBS which when ran runs a macro in an Access database.

My current VBS is :

Code:
Option Explicit

dim oaccess

set oaccess = createobject("access.application")
oaccess.opencurrentdatabase "C:\temp\qm data storage\Audit - TCF Master Temp.mdb"
oaccess.docmd.runmacro "Mcr_Submit"
oaccess.closecurrentdatabase
oaccess.quit
set oaccess=nothing

WScript.Quit(0)

This works perfectly fine on my NT4/Win2K machine but when I try and run this on my XP machine I get an error:

Scipt: C:\temp\qm data storage\AuditBatchSubmit.vbs
Line: 6
Char: 1
Error: Microsoft Office Access can't open the database becasue it is missing, or opend exclusivly by another user.
Code: 800A1EBA
Source: (null)

The database is there, I can open it exclusivley myself, which I wouldnt be able to do if someone else was in it exclusivley...

The database is a Access2000 type database, my XP machine has Access 2003 installed.

Any help would be great.
 

Users who are viewing this thread

Back
Top Bottom