I am trying, for the first time, to use the Hyperlink option for a textbox to open a PDF file and I get a read-only run-time error when running my code.
The field in the table is of Data Type "Hyperlink".
The textbox properties:
IsHyperlink = "No" ( I have also tried setting this to "YES")
Display as Hyperlink = "If Hyperlink"
Hyperlink Target = C"\My Path\ ( I have also tried leaving this blank)
When I manually perform a Hyperlink Edit on the textbox, it works as it should. However I am trying to use VBA to create the Hyperlink Address using the following code that I've found in researching Hyperlinks in general:
With Forms("CashChargeTransaction").Controls("ReceiptAddress").Hyperlink
.Address = "C:\Users\Walt\Documents\Warranty Receipts\Distributor.pdf"
End With
The result is a run-time error '7980': The HyperlinkAddress or HyperlinkSubAddress property is read-only for this hyperlink.
I don't know, and haven't been able to locate information as to where the HyperlinkAddress property is or how to change it.
Suggestions/direction will be muchly appreciated.