Hi, i am new to Vb and i am trying to get a field in my table to open up as a hyperlink once it is clicked. i have the following code:
Private Sub lblReference_Click()
Dim strLinkUrl As String
Dim strPath As String
Dim strName As String
strName = lblReference.Text
strPath = "http://helpdesk.travel.com/tickets/"
strLinkUrl = strPath & strName
Me.lblReference.Hyperlink.Address = strLinkUrl
End Sub
the data lblReference text field is a 5 digit number e.g. 12345 so i want to be able to go to the following address when i click on the lblReference field: http://helpdesk.travel.com/tickets/12345
however when i try to i get the following error:
run time error: '7980' the HyperlinkAddress or HyperlinkSubAddress property is read-only for this hyperlink.
can anyone advise me in simple terms what i am doing wrong and what i am supposed to be doing please?