hyperlink

J

Joel Allen

Hi,

I want to make a command button in my form a hyperlink to a specific file.
The specific file path is in another field on the form.

How can I go about making a hyperlink command button look at another field
in the form to configure the hyperlink?

Thanks,
Joel
 
L

Larry Linson

Joel Allen said:
I want to make a command button in my form
a hyperlink to a specific file. The specific file
path is in another field on the form.

How can I go about making a hyperlink
command button look at another field
in the form to configure the hyperlink?

Data is stored in Fields in Tables, retrieved in Fields in Queries, but is
displayed in Controls on Forms or Reports. Assuming you mean the data is
displayed as text in a Control, and assuming that is a Text Box named
txtPathAndFile, and that the full path and file name are shown, then, in the
Click event of the Command Button, put:

If Not IsNull(Me.txtPathAndFile) Then
Application.FollowHyperlink Me.txtPathAndFile,,True
End If

This will open the file whose valid address is specified in txtPathAndFile,
in a new Window.

Larry Linson
Microsoft Office Access MVP
 

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