Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 609
  • Last Modified:

Hyperlinks in Access 2003 and 2010

Dear Experts, I am updating an Access application so it operates in both 2003 and 2010. We have a number of other applications that only work in 2003, so our PCs have both versions installed, which will continue to be a problem until I can complete the migration to 2010.

The form in question is based on a query, which calculates a string for the UNC textbox as...
 "#" & "\\server\share\" & LocalLocation & "#"
...which gives...
#\\server\share\folder1\folder2\file.pdf#

The textbox Is Hyperlink property is set to Yes and in Access 2003 this works fine, users happily click on the resulting hyperlink and their file opens.

However in Access 2010, only the LocalLocation is shown and hyperlinked eg folder1\folder2\file.pdf and the \\server\shared\ component ignored, and of course it fails. When I check the textbox in Access 2010 the Is Hyperlink property is still Yes, but the new Display As Hyperlink property is "If Hyperlink". When I change this to "Always", it works as expected.

So, is there anyway I can change this field or the calculation in the query in Access 2003, such that the hyperlink will be correctly interpreted in Access 2010?

Your thoughts and comments much appreciated
...Terry
0
terencino
Asked:
terencino
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I've never used the Hyperlink property. Instead, you can use the Application.FollowHyperlink method, which should open your pdf file. To do that, just put the full path to the object in the textbox or label, and use FollowHyperlink in the click event of the object. You can even format the text as Blue and underline it (or whatever makes it look right).
0
 
terencinoAuthor Commented:
Perfect solution thank you LSMConsulting! Minimal change to the Access 2003 database and looks the same to users.
Thanks again!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now