Jump to content

Hyperlinks in VBA (Access 2010)

- - - - -

  • Please log in to reply
1 reply to this topic

#1
TommyMasta

TommyMasta

    Newbie

  • Members
  • Pip
  • 1 posts
Hello, i need to create Hyperlinks in Forms in MS Access 2010, not in editor, but necessarily in VB, and to add them to for example TextBoxes. I cant find any useful informations in Web, so i need help. I`d be glad if someone gives example. Thanks in advance! Tommy.

#2
QAFQUNAM2001

QAFQUNAM2001

    Newbie

  • Members
  • Pip
  • 1 posts
Hi, mi solution works with textbox'es and bound forms. In the first place you must set the textbox property Ishyperlink to yes. Now from VB:

Sub assignlynk()
Dim Yourroute As String
Yourroute = "C:\Users\kijimenez\Documents\DESCARGA DE PROGRAMAS.doc" 'here goes the route to your document
Yourformname.textbox1.value = "Route to hyperlink # " & Yourroute 'the # sign is very important
End Sub

Now when you click on the textbox the hyperlink will be opened.

You may want to check: Microsoft Access tips: Introduction to Hyperlink fields

Hope it helps




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users