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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open program with path in field

Status
Not open for further replies.

dful

Programmer
Sep 26, 2002
21
US
I have a table with paths to other databases
ex.
Company Path
CompanyX "C:company\xdata.mdb"
CompanyY "C:company\ydata.mdb"
Companyz "C:company\zdata.mdb"

I want to display the company name in a continouous form & add a sub to the field that will open the program.

ex.
Private Sub company_Click()
Dim stAppName As String


stAppName = "MSACCESS.EXE [path]"
Call Shell(stAppName, 1)

End Sub

What syntax should I use to get the path to work?
I get the error "MS Access can't find the database file '[path].mdb'

Thanks.
 
I have made this work before with hyperlinks.
This creates more problems for me though.
When the hyperlink is selected the main form automatically minimizes (is there a way to control this because it does not happen on all machines?). The form is a pop-up that does not have min/max buttons which creates the problem.
Hyperlinking also opens the web toolbar & this is a problem for some users as well. I think I need to make it work with the shell command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top