I am trying to automaticly create a hyperlink to a file on a network drive. This is what I have (which only wants to update the display text of the hyperlink)
In a form, on the key field, I have code attached to 'On lost focus' linkpic is the field where I want the hyperlink to reside (it is classified as a hyperlink in table and 'ishyperlink' is set to yes in form control)
Private Sub PURCHASE_LostFocus()
Me!linkpic = gethyper(PURCHASE)
End Sub
And a function:
Function gethyper(po_no As String) As String
Dim directory As String
directory = "H:\license"
Dim extension As String
extension = "gif"
gethyper = directory & "\" & po_no & "." & extension
End Function
I am sure I am missing something very easy here, but my head is bruised from banging it on the desk.
Any help is appreciated.
In a form, on the key field, I have code attached to 'On lost focus' linkpic is the field where I want the hyperlink to reside (it is classified as a hyperlink in table and 'ishyperlink' is set to yes in form control)
Private Sub PURCHASE_LostFocus()
Me!linkpic = gethyper(PURCHASE)
End Sub
And a function:
Function gethyper(po_no As String) As String
Dim directory As String
directory = "H:\license"
Dim extension As String
extension = "gif"
gethyper = directory & "\" & po_no & "." & extension
End Function
I am sure I am missing something very easy here, but my head is bruised from banging it on the desk.
Any help is appreciated.