Hyperlink not Working - Opens Webtoolbar

Access_guy49

Registered User.
Local time
Today, 16:05
Joined
Sep 7, 2007
Messages
462
Hey everyone,
So I have a form in which the user can enter the path to a folder which is involved in the record they are creating. The field is a hyperlink field. The form seems to work fine and the user can browse and select a folder with some code I have on a button. Once done the field is populated and the path is underlined and blue (as it should be)

The problem is, if I click on the hyperlink in the form (or in the table) it doesn't open anything. Infact it only brings up the web toolbar. The address in the web toolbar is the address to the database. If I delete the address in the web toolbar and then click on the hyperlink, the webtoolbar address populates with the address to the database again.
Does anyone know what's going on here? how to fix it?

Thanks!
 
Ok so I figured it out!

I had a button that created a variable to hold the path name as a string.

MyVariable = Function(this function used a Filedialog API to get a folder path)

Then I set my field
me.hyperlink = MyVariable

This set the display text but not the address text. When you type in the field everything works fine, but when your useing VBA you have to use special Formatting for Hyperlinking. I had to add a line of code to alter my variable string before I set my hyperlink field to equal it.

Myvariable = MyVariable & "#" & MyVariable & "#"

The format needs to be: displayName#Address#

So when all I had was the straight text it wasn't working! lol silly.
Hope that helps if anyone else ever has that problem!
 

Users who are viewing this thread

Back
Top Bottom