Joe4 Posted May 22, 2015 Share Posted May 22, 2015 I am creating a script that copies over the most recent version of a Front-End Access database to a user's hard-drive, and then opens it. I have researched and seen lots of topics on connecting to an Access database, but I am not trying to do that. I am simply trying to open it for them.In a DOS batch file, the file to do that would look something like this:"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "C:\Databases\MyDatabase.accdb"So, what is the equivalent statement I would use in an AutoIt script to open the Access database?Thanks Link to comment Share on other sites More sharing options...
Danp2 Posted May 22, 2015 Share Posted May 22, 2015 Please clarify: Are you trying to launch MSAccess on the user's workstation or are you trying to access / read from the database directly from your script? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 22, 2015 Moderators Share Posted May 22, 2015 (edited) Hi, Joe4, welcome to the forum. Look at Run in the help file, the syntax would be almost identical.Edit - Or, look at ShellExecute: ShellExecute("C:\Databases\MyDatabase.accdb") Edited May 22, 2015 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Danp2 Posted May 22, 2015 Share Posted May 22, 2015 If you just want to launch Access similar to the batch file, then you should take a look at the Run and ShellExecute commands in the help file. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Joe4 Posted May 22, 2015 Author Share Posted May 22, 2015 Thank you!ShellExecute did the trick! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now