Problem with populating a hyperlink field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2002. I have a table with a hyperlink field that I want to populate
with drawing image files related to the records (inventory parts). Our
drawing numbers coincide with our part numbers. So I wrote an update query
to trim and merge the part numbers with the network path and file extension.
I have a couple thousand images to link so doing this manually is not an
option. I run the query and it populates the field correctly, but there is
no hyperlink actually established. If I delete the content of the field and
hand type it back in the hyperlink is established. HELP! I can't do these
by hand plus I have new drawings created daily. Can anybody tell me what I
am doing wrong or what I can do?

Thanks, Rob Wilson
 
Hi Rob,

Pasted below is an earlier response I had written for a similar question. I
think it should answer your's as well, but in your case you will be supplying
the text via the update query instead of VBA.

Here's the text...
When adding hyperlinks via VBA, it is important to be aware that hyperlinks
consist of 4 different parts. Each part is separated by a # sign. Access
does not display all parts. The first part is the display name, then a #
sign, then the actual hyperlink address, then another # sign, etc.

If a display name is entered, that's what is displayed to the user. If not,
the address is displayed. In either case, the address determines the actual
link.

In your case, if you did not add a # sign in front of the path/filename, it
would have entered the path/filename as the display name, without any
address.

Try adding a # sign before and after the path/filename, and it will probably
work for you.

Access has a full description of the parts under "About Hyperlinks" in Help.
You may also want to look at the hyperlinkpart() function (I'm pretty sure
that is the name of it). That function can be used in queries to pull just
one part of a hyperlink field. It can be useful sometimes.

One other option you may want to consider. You can just enter the address
in a regular text field (without the # signs), and use DoCmd.FollowHyperlink
in VBA to open the file when clicked.

HTH, Ted Allen
 
Back
Top