I have been struggling with this for a while. On my form I have a text field that upon change sets (setvalue) the hyperlink for a file which worked great (or so I thought) but I couldn't figure out why the links weren't operating correctly. A search of this site revealed the error of my ways......that using 'setvalue' will not work for hyperlinks.
My problem is that I can't get the code from BillR to work correctly. The code uses a command button but I need to do it with the text box (I think). My hyperlink field is [MapLoc] and the text box is [txtDestin]. The code I am trying to work out is:
Dim ctl As CommandButton, i As Integer
Set ctl = Me!Command44
With ctl
If IsNull(Me!Text56) = False Then
.HyperlinkAddress = Me!Text56
End If
If .HyperlinkAddress = "" Then
GoTo out
End If
.Hyperlink.Follow True
End With
out:
End Sub
Thanks!
My problem is that I can't get the code from BillR to work correctly. The code uses a command button but I need to do it with the text box (I think). My hyperlink field is [MapLoc] and the text box is [txtDestin]. The code I am trying to work out is:
Dim ctl As CommandButton, i As Integer
Set ctl = Me!Command44
With ctl
If IsNull(Me!Text56) = False Then
.HyperlinkAddress = Me!Text56
End If
If .HyperlinkAddress = "" Then
GoTo out
End If
.Hyperlink.Follow True
End With
out:
End Sub
Thanks!