From: Jimmy on 17 Feb 2007 19:58 Im using the following code to open a second access database: Dim stAppName As String Dim retVal As Integer stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" retVal = Shell(stAppName, 1) and access returns an error of File Not Found. I tried the following variation with the same result: Dim stAppName As String stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" Call Shell(stAppName, 1) Dim stAppName As String stAppName = "C:\Program Files\Microsoft Office\OFFICE11\msaccess.exe" &_ "C:\PlantManager\Plants.mdb" Call Shell(stAppName, 1) Dim stAppName As String stAppName = "msaccess.exe" & Chr(34) & "C:\PlantManager\Plants.mdb" & Chr(34) Call Shell(stAppName, 1) any thoughts
From: Lyle Fairfield on 17 Feb 2007 20:15 On Feb 17, 7:58 pm, "Jimmy" <d...(a)email.me> wrote: > Im using the following code to open a second access database: > > Dim stAppName As String > Dim retVal As Integer > > stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" > retVal = Shell(stAppName, 1) > > and access returns an error of File Not Found. I tried the following > variation with the same result: > > Dim stAppName As String > stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" > Call Shell(stAppName, 1) > > Dim stAppName As String > stAppName = "C:\Program Files\Microsoft Office\OFFICE11\msaccess.exe" &_ > "C:\PlantManager\Plants.mdb" > Call Shell(stAppName, 1) > > Dim stAppName As String > stAppName = "msaccess.exe" & Chr(34) & "C:\PlantManager\Plants.mdb" & > Chr(34) > Call Shell(stAppName, 1) > > any thoughts Thought1: Shell SysCmd(acSysCmdAccessDir) & "MsAccess.Exe " _ & """C:\Documents and Settings\Lyle Fairfield\My Documents\Access \northwind.mdb""" Thought2: Dim a As Access.Application Sub temp() Set a = New Access.Application With a .OpenCurrentDatabase "C:\Documents and Settings\Lyle Fairfield\My Documents\Access\northwind.mdb" .Visible = True End With End Sub Sub Later() If Not a Is Nothing Then a.Quit Set a = Nothing End If End Sub Thought3: When you tell why sometimes there are better ways suggested.
From: CDMAPoster on 17 Feb 2007 20:18 On Feb 17, 7:58 pm, "Jimmy" <d...(a)email.me> wrote: > Im using the following code to open a second access database: > > Dim stAppName As String > Dim retVal As Integer > > stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" > retVal = Shell(stAppName, 1) > > and access returns an error of File Not Found. I tried the following > variation with the same result: > > Dim stAppName As String > stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" > Call Shell(stAppName, 1) > > Dim stAppName As String > stAppName = "C:\Program Files\Microsoft Office\OFFICE11\msaccess.exe" &_ > "C:\PlantManager\Plants.mdb" > Call Shell(stAppName, 1) > > Dim stAppName As String > stAppName = "msaccess.exe" & Chr(34) & "C:\PlantManager\Plants.mdb" & > Chr(34) > Call Shell(stAppName, 1) > > any thoughts http://www.m-w.com/dictionary/Isthisatrickquestion? The word you've entered isn't in the dictionary. Click on a spelling suggestion below or try again using the search bar above. Suggestions for isthisatrickquestion?: 1. aesthetic distance 2. East Stroudsburg 3. aussitot dit, aussitot fait ..exe " James A. Fortune CDMAPoster(a)FortuneJames.com
From: Jimmy on 18 Feb 2007 13:22 "'69 Camaro" <ForwardZERO_SPAM.To.69Camaro(a)Spameater.orgZERO_SPAM> wrote in message news:12tfab9hov4e410(a)corp.supernews.com... > This line of code concatenates two strings together: > > stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" > stAppName = "msaccess.exe C:\PlantManager\Plants.mdb" works like a charm!
From: Jimmy on 18 Feb 2007 13:24
What? <CDMAPoster(a)FortuneJames.com> wrote in message news:1171761482.831896.114600(a)v33g2000cwv.googlegroups.com... > On Feb 17, 7:58 pm, "Jimmy" <d...(a)email.me> wrote: >> Im using the following code to open a second access database: >> >> Dim stAppName As String >> Dim retVal As Integer >> >> stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" >> retVal = Shell(stAppName, 1) >> >> and access returns an error of File Not Found. I tried the following >> variation with the same result: >> >> Dim stAppName As String >> stAppName = "msaccess.exe" & "C:\PlantManager\Plants.mdb" >> Call Shell(stAppName, 1) >> >> Dim stAppName As String >> stAppName = "C:\Program Files\Microsoft Office\OFFICE11\msaccess.exe" >> &_ >> "C:\PlantManager\Plants.mdb" >> Call Shell(stAppName, 1) >> >> Dim stAppName As String >> stAppName = "msaccess.exe" & Chr(34) & "C:\PlantManager\Plants.mdb" & >> Chr(34) >> Call Shell(stAppName, 1) >> >> any thoughts > > http://www.m-w.com/dictionary/Isthisatrickquestion? > > The word you've entered isn't in the dictionary. Click on a spelling > suggestion below or try again using the search bar above. > > Suggestions for isthisatrickquestion?: > 1. aesthetic distance > 2. East Stroudsburg > 3. aussitot dit, aussitot fait > > .exe " > > James A. Fortune > CDMAPoster(a)FortuneJames.com > |