none
Unbound Text Boxes RRS feed

  • Question

  • Can someone explain in details including codes how to convert an unbound text box for the purpose of hyperlinking? 

    Friday, September 23, 2016 8:09 PM

Answers

  • Hi,

    You could visit TextBox.Hyperlink Property (Access).

    The sample code CreateHyperlink in the article above sets the hyperlink properties for a command button, label, or image control to the address and subaddress values passed to the procedure

     

    It uses Hyperlink.Address Property (Access) to set the path of hyperlink.

    Also, you could see the code below, it opens the path in TextBox after clicking the button.

     

    Private Sub Command24_Click()
     NewHyperlink Me!Command24, Me!Text22
    End Sub
    Sub NewHyperlink(ctlSelected As Control, _
     strAddress As String)
     Dim hlk As Hyperlink
     Select Case ctlSelected.ControlType
     Case acLabel, acImage, acCommandButton
     Set hlk = ctlSelected.Hyperlink
     With hlk
     .Address = strAddress
     .Follow
     End With
     Case Else
     MsgBox "The control '" & ctlSelected.name _
     & "' does not support hyperlinks."
     End Select
    End Sub


    Monday, September 26, 2016 2:24 AM
    Moderator