Re: How to start MS Access 2003 app from vb.net app
From: moondaddy (moondaddy_at_nospam.com)
Date: 03/01/05
- Next message: Brent E: "RE: I need to VBA Assistance to pass an Access variable as a parameter"
- Previous message: RD: "A little OT - Quite a rant on microsoft.public.sqlserver.olap"
- Next in thread: Brendan Reynolds: "Re: How to start MS Access 2003 app from vb.net app"
- Reply: Brendan Reynolds: "Re: How to start MS Access 2003 app from vb.net app"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 17:53:20 -0600
Thanks Brian, but I'm not having good luck with this. Can you trouble shoot
why this isnt working?
When I call the shell cmd, I get a "File Not Found"
error. here's my code:
Dim ClientPath As String = Directory.GetCurrentDirectory & "\" &
System.Configuration.ConfigurationSettings.AppSettings("ClientName")
If File.Exists(ClientPath) Then
'Code hits this line
Console.WriteLine("exists")
Else
Console.WriteLine("exists not")
End If
Dim ProcID As Integer
ProcID = Shell( ClientPath, AppWinStyle.NormalFocus)
'Also tried the line below
'ProcID = Shell("""" & ClientPath & """", AppWinStyle.NormalFocus)
Any ideas how I can get this running?
Thanks.
-- moondaddy@nospam.com "Brian" <bcap@IHATESPAMclara.co.uk> wrote in message news:1109341516.81593.0@dyke.uk.clara.net... > "moondaddy" <moondaddy@nospam.com> wrote in message > news:%23BVbCgvGFHA.544@TK2MSFTNGP12.phx.gbl... >> I have an MS Access 2003 application and now I want to be able to start >> it >> up from a vb.net app. Additionally, the vb.net application will be >> validating the user, checking for updated versions of the Access app and > if >> there are new versions, will prompt the user to download a zipped copy of >> the new version via a web service. What I'm not sure about is how to >> actually startup an instance of the Access app and once its open, close > the >> .net app. And the really tricky part, is that I need to pass in a few >> variables from the .net app once the access app is open and running. > These >> variables will be the computer name, name of person logged into the >> computer, and name of the person logged into the application (via the >> .net >> app). I know it sounds overly complicated, but we have our reasons. so > in >> summary, here's what I would like to know: >> >> 1) how to start ms access app from vb.net app >> 2) how to pass in a few variable from the .net app to the Access app >> 3) close the .net app and leave the Access app running (this part might >> be > a >> no-brainer, but I haven't tried it yet). >> >> Thanks. >> >> -- >> moondaddy@nospam.com >> >> > > Use the Shell command in VS.Net to run Access. Specify Access command > line > arguments as appropriate in the Shell command's "args" argument. Use the > /cmd argument in the Access command line to specify the values you want to > pass in. Use the Command function in Access to retrieve whatever was > specified on the command line. Have the .Net thingy close itself once > it's > shelled Access. > >
- Next message: Brent E: "RE: I need to VBA Assistance to pass an Access variable as a parameter"
- Previous message: RD: "A little OT - Quite a rant on microsoft.public.sqlserver.olap"
- Next in thread: Brendan Reynolds: "Re: How to start MS Access 2003 app from vb.net app"
- Reply: Brendan Reynolds: "Re: How to start MS Access 2003 app from vb.net app"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|