Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening an ArcView Application from Access97

Status
Not open for further replies.

sera

Technical User
Jun 29, 2000
360
US
Hello,
I am trying to put a cmd button on my main form that will allow me to open an ArcView application. I tried using the cmd button wizard, Run Application, I then browsed to where my project is and I get the error message "Invalid Call or Procedure". I suppose I am getting this message because my ArcView application is not something that Access can read. I am hoping that this is not the case. Anyway,
I am hoping that one of you will have done this before.
Thank You,
Sera
 
Assuming you are using the Shell command in your module:

Private Sub btnOpenArcView_Click()

Dim strAppName as String, strFileName as String

strAppName = "..programpath..\arcview.exe"
strFileName = "..projectpath..\project.apr"

Call Shell(strAppName & " " & strFileName, 1)
 
Here's a simpler method:

Use the Hyperlink Address field of the command button to store the location of your ArcView file, like "D:\DATA\PROJECT.APR".

The only annoyance with this is that you may have an MS message pop up asking you to confirm opening the file.
 
Hey, Thanks PROGAiea,
I learned a much smoother way. I couldn't get your first suggestion to work. I did get the second method to work but that MS message pop up was really annoying. Someone else suggested that I use the following code:
Dim stAppName As String
stAppName =
"c:\esri\av_gis30\arcview\bin32\arcview.exe_C:\MarshallWatershed\Albertville
SW.apr"
Call Shell(stAppName, 1)
This works very well and will help anyone trying to do this in the future!!!Sera
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top