T
Tim McD
I have created code to automaticly create a hyperlink address base on user
input from a click of a command button. We are linking to pdf file on our
server to a field in a table. Each pdf has a unique name that is associated
to field in a table. That field is set to hyperlink. However I get an
"run-time error '7980' THe Hyperlink Address or SubAddress property is read
only for this hyperlink". What am I missing?
Dim lCallID, lHyper, lLinkAdd As String
Public Sub GenHyper()
Dim lCall, lLink, lExt As String
Dim dNum As Single
lCall = CallSign
lLink = "License\!Site&LicenseDatabase\"
lExt = ".pdf"
lCallID = lLink + lCall + lExt
lHyper = lCallID
lLinkAdd = lCallID
Lookup.IsHyperlink = True
Lookup.Hyperlink.Address = lLinkAdd
Lookup.Hyperlink.TextToDisplay = lHyper
End Sub
Private Sub Command60_Click()
Lookup.SetFocus
If Lookup.Text = "" Then
Call GenHyper
End If
Lookup.Hyperlink.Address = lLinkAdd
End Sub
input from a click of a command button. We are linking to pdf file on our
server to a field in a table. Each pdf has a unique name that is associated
to field in a table. That field is set to hyperlink. However I get an
"run-time error '7980' THe Hyperlink Address or SubAddress property is read
only for this hyperlink". What am I missing?
Dim lCallID, lHyper, lLinkAdd As String
Public Sub GenHyper()
Dim lCall, lLink, lExt As String
Dim dNum As Single
lCall = CallSign
lLink = "License\!Site&LicenseDatabase\"
lExt = ".pdf"
lCallID = lLink + lCall + lExt
lHyper = lCallID
lLinkAdd = lCallID
Lookup.IsHyperlink = True
Lookup.Hyperlink.Address = lLinkAdd
Lookup.Hyperlink.TextToDisplay = lHyper
End Sub
Private Sub Command60_Click()
Lookup.SetFocus
If Lookup.Text = "" Then
Call GenHyper
End If
Lookup.Hyperlink.Address = lLinkAdd
End Sub