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

Hyperlink to a file from a listbox?

Status
Not open for further replies.

jakesups

IS-IT--Management
May 6, 2003
18
0
0
US
In my list box I have a listing of files on the hard drive from a table. The table has the field set to hyperlink.

Table;
Type_of_link Text
File_link hyperlink

A typical link in the File_link field would be;
User File#d:\documentation\user.doc

The fields show up properly in a combo box and hyperlink to the appropriate file, but in a list box, they show up, but no underline under them and they don't link.

Any ideas?

Jim
 
Hi Jim,

This might not be the best way to do it, but it should work:

1. make sure the bound column of your listbox is file_link

2. create a module, copy and paste the following code into your module

3. Add a new sub to handle dbl-click
private sub files_dblclick()
fHandleFile files.value, WIN_NORMAL
end sub

Hope this helps.

Jack
 
I've tried it, but unfortunately I'm getting a stupid error in the dblclick() routine. Since I'm so new to this, I'm not sure what the message means.

"The expression on DBL click you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name.
* The expression may not result in the name of a macro, the name of a user-defined function, or [event procedure].
* There may have been an error evaluation the function, event or macro."

Here is my routine:

Private Sub FILES_DblClick()
fHandleFile(FILES.Value, WIN_NORMAL)
End Sub

I tried to follow the embedded examples, but no luck. Can you tell me what I'm missing?

Thanks again, Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top