Open Enterpirse Manager with Button

B

BillyRogers

I'm trying to code a button on an Access form to open Enterprise Manager.
Here's the code I'm using but it doesn't work.


Shell """C:\Program Files\Microsoft SQL Server\80\Tools\Binn\SQL Server
Enterprise Manager.MSC""", vbNormalFocus


I've verified that the path is correct--I can go to this folder and double
click and it runs. Can anyone tell me how to do this?

(This is in Access 2000 and SQL Server 2000)

Thanks,
Billy

--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000, Office 2003 and Visual Studio
2005
 
D

Douglas J. Steele

I believe the problem is that Shell doesn't know anything about the .msc
extension.

Try:

Shell "mmcbase.dll ""C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\SQL Server Enterprise Manager.MSC""", vbNormalFocus
 
B

BillyRogers

It didn't work. I got this error message.

Runtime error '5'
Invalid Procedure Call or argument

--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003
 
D

Douglas J. Steele

Sorry, my fault. I just looked up the association in the registry, and
didn't test.

Turns out you need

Shell "mmc ""C:\Program Files\Microsoft SQL Server\80\Tools\Binn\SQL
Server Enterprise Manager.MSC""", vbNormalFocus
 
B

BillyRogers

Thanks Douglas, that worked perfectly. It really helps me out.
--
Billy Rogers

Dallas,TX

Currently Using SQL Server 2000, Office 2000 and Office 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top