Reputation: 150
I'm struggling on how to open MS Access Runtime using VBA, from an Excel file.
You can open the full version of Access using CreateObject("Access.Application")
, but that doesn't open Access in Runtime.
We only have Microsoft Access Runtime installed in some computers, because that's all we need to use the front-ends we've developed. So we need to open the accdb files using MS Access Runtime, but from Excel.
Any help is appreciated, thank you
Upvotes: 6
Views: 3533
Reputation: 1726
You can use the Shell to open a file, as if you typed that command into window's command prompt.
d = Shell("pathToFile\Database1.accdb /runtime", vbNormalFocus)
Another option you could use to open in the file in runtime (if someone opens it from the folder or through some other method without the /runtime switch) would be to change the file extension to .accdr. This will always force runtime.
Upvotes: 3