Link to home
Create AccountLog in
Avatar of gdunn59
gdunn59

asked on

How to Open SQL Server Management Studio via VBA from MS Access

I have an Access Database and I would like to add a button to my form that will automatically open SQL Server Management Studio (SSMS) via VBA.

How can I accomplish this?

Thanks,

gdunn59
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

What would be the point of that? Just curious, really ...

You could use the Shell command to execute the executable. In my case, it's installed here:

C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio

So I'd use this:

Shell "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\ssms.exe"
Avatar of gdunn59
gdunn59

ASKER

Scott:

Because this is just the first step that a user has to do before finalizing a report that I have programmed in Access.  I just wanted to make it easier for the user when they launch my database, they can click a button to open SQL Server and have the query already there on the screen and ready to execute.

Thanks,
gdunn59
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer