Avatar of jtalbott
jtalbott

asked on 

VB code to launch and run an ACCESS DB

I'm trying to get a Macro to run to open an Access 2007 DB which is located on a shared drive S.  

I get this error message " There is no script engine for this file extension".mde"

This is the code:

[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_
sub subSub1_()

Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run "WScript.exe S:AcsData\Disco.mde", 1, False

end sub
ProgrammingVB Script

Avatar of undefined
Last Comment
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
To use Shell you must include the path to the MSACCESS.EXE

wshShell.Run "C:\<<path to EXE>>\MSAcess.exe WScript.exe S:AcsData\Disco.mde", 1, False
Opps...

Try this:

wshShell.Run "C:\<<path to EXE>>\MSAcess.exe S:AcsData\Disco.mde", 1, False
Programming
Programming

Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.

55K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo