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

Form Button to link a pdf file

Status
Not open for further replies.

jcallavini

Technical User
Apr 5, 2000
5
US

Hi,

I need help, as you will see by my question I am not a programer. I found this code searching the file on this forum. It works great, but I need it to populate the

"C:\Documents and Settings\Fredrick\My Documents\timesheet access programs\fox-otfolder\ACCESS ROUTINES FOR VISUAL BASIC\ea.doc"

by getting the information from my form field labeld path. Can someone help me to replace the string of data by using the data stored in my path field.


stPath = "C:\Documents and Settings\Fredrick\My Documents\timesheet access programs\fox-otfolder\ACCESS ROUTINES FOR VISUAL BASIC\ea.doc"
If Dir(stPath)<>"" Then
FollowHyperlink stPath
Else
MsgBox "Cannot find " & strpath
End If

THank you for your help.
 
If the field on the form has the whole path in it, then change the stPath line to:

stPath = Me![Path]

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top