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 and Filepicker

Status
Not open for further replies.
May 21, 2003
64
0
0
US
I'm working on a database that allows users to click on a button and browse for files to attach files (usually excel) to a form that will later be used in specific projects. Once they click on the file I have the path to the file they chose saved in a text box on the form and the "Attachments" table behind the form. The datatype of the attachment field in the table is set to hyperlink. The second step occurs when another group of users begin work on the project (usually a week or so later) and need to pull up the attached file to begin their work.

The file picker actually works well, I just can't get the hyperlink to work. It is showing up on the form in the textbox underlined in blue and when I roll over the path the cursor turns into a hand, typical of a hyperlink. I just need the users to click on the link in textbox on the form and have the files open. Any thoughts? I'm sure it is quite a bit easier than the filepicker, I'm just stuck. Here's my filepicker code which again is working.

Private Sub attach1_Click()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)

Dim vrtSelectedItem As Variant
With fd

If .Show = -1 Then

For Each vrtSelectedItem In .SelectedItems

Attachment1 = vrtSelectedItem

Next vrtSelectedItem
Else
End If
End With

Set fd = Nothing
End Sub
 
Thanks. Worked pefectly. Appreciate the help with my method block. D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top