If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hyperlink to a file
Hello. I am trying to setup a command button on a form that will
allow me to assign a hyperlink that will automatically open a file (word, excel, pdf, etc) when I click on it. However, I am unsure how to setup the code that will allow me to create the hyperlink. So far, I have a field (FileHyperlink) in my table (ExpensesMain) that is setup as a hyperlink field. Is there a way to have a command button open up a dialog box that I can search for the file I want to assign, select it, and have it assigned to the tect box on my form (Text box name: txtFileHyperlink - Form Name: ExpensesDetail)? Thank you. |
#2
|
|||
|
|||
Hyperlink to a file
Just a regular textbox, holding the full path to the file. In a form, refer
use code like: Private Sub cmdHyperlink_Click() Dim strPath As String If Not IsNull(Me.txtBoxName) Then strPath = Me.txtBoxName Me.cmdHyperlink.HyperlinkAddress = strPath End If End Sub -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com wrote in message ... Hello. I am trying to setup a command button on a form that will allow me to assign a hyperlink that will automatically open a file (word, excel, pdf, etc) when I click on it. However, I am unsure how to setup the code that will allow me to create the hyperlink. So far, I have a field (FileHyperlink) in my table (ExpensesMain) that is setup as a hyperlink field. Is there a way to have a command button open up a dialog box that I can search for the file I want to assign, select it, and have it assigned to the tect box on my form (Text box name: txtFileHyperlink - Form Name: ExpensesDetail)? Thank you. |
#3
|
|||
|
|||
Hyperlink to a file
Thank you
|
Thread Tools | |
Display Modes | |
|
|