Follow Hyperlink

G

Guest

Good day.

I have a table called tblMain that has the following three fields.

OrderNum "file Number Field
FileLoc " file location Feild
Notes "Any notes or comments about the file.

I now have a form called frmMain. In this form I have a list box called
List0. On the double click event I would like on the selected file location
in the list box to follow hyperlink and open the Office application.

Any help would be appreciated
 
G

Guest

what does your list display (filenames, filename with paths,...).

Depending on the answer you may need to use dlookup or not.

Dim strFile as String
strFile = Me.lstTables.Column(0) 'determine currently selected item
'If you only have filename and not the complete path, use dlookup to
'check your table for the full path and concatenate it to the filename
Application.FollowHyperlink strFile 'open the file for viewing
 
G

Guest

Thanks for the reply.

My list box only displays the Description of the file called FileDesc and
the FileNotes. The file path is the first comlumn / field in my table /
listbox called Filepath but is hidden in the list box.

The path for example is
P:\Ind. Eng\SFDC_REPORTING\SDFC Reporting DBase_V5_Latest.mdb
which is the FileLoc
 
G

Guest

Got it thanks for your help

Daniel said:
what does your list display (filenames, filename with paths,...).

Depending on the answer you may need to use dlookup or not.

Dim strFile as String
strFile = Me.lstTables.Column(0) 'determine currently selected item
'If you only have filename and not the complete path, use dlookup to
'check your table for the full path and concatenate it to the filename
Application.FollowHyperlink strFile 'open the file for viewing
 

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