Jump to content

how to run m$ access base (*.mdb file)


maxd
 Share

Recommended Posts

i try :

$ms = "C:\Program Files\Microsoft Office\Office10\msaccess.exe"
Run("$ms C:\base.mdb")

.. and not work :P

Try

Run($ms & "c:\base.mdb")


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Error: Unable to execute the external program :lmao:

but if create "runmdb.bat" file:

c:\base.mdb

and script

Run("c:\runmdb.bat")

works :P

Try

$ms = FileGetShortName("C:\Program Files\Microsoft Office\Office10\msaccess.exe")
Run($ms & "C:\base.mdb")
Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Try this:

$path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\InstallRoot", "Path") & "msaccess.exe "
$mdb = "C:\Test.mdb"
Run($path & $mdb)

You will have to adjust the number in the code above (i.e. 11.0) to reflect the version of office you have installed.

Office 2000 = 9.0

Office XP 2002 = 10.0

Office 2003 = 11.0

but I think the problem with your code was that there was no space between the command line and database path.

Run($ms & "c:\base.mdb")

Would return "C:\Program Files\Microsoft Office\Office10\msaccess.exec:\base.mdb"

There has to be a space between msaccess.exe and c:\base.mdb

Run($ms & " " & "c:\base.mdb")[code=auto:0]

Should fix your problem

We have enough youth. How about a fountain of SMART?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...