open file from access

lala

Registered User.
Local time
Today, 13:39
Joined
Mar 20, 2002
Messages
741
how do you do this with vb?

thank you
 
Using VB Code I attached this to a button:

Private Sub btnOpen_Click()

Me.btnOpen.HyperlinkAddress = "C:\Folder\Files\File.xls"

End Sub

You could also just have the HyperlinkAddress automatically on the button, this is edited code... in the actual database the user filled in the folder path and filename into a textbox and had this button open it. the code was:

Private Sub btnOpen_Click()

Dim file As String

If Not IsNull(FileName) Then

file = FileName

Me.btnOpen.HyperlinkAddress = "C:\Files\" & file

Else

Me.btnOpen.HyperlinkAddress = ""

End If

End Sub
 
Thank you very much!!!
 

Users who are viewing this thread

Back
Top Bottom