473,715 Members | 5,945 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with A Hyperlink Control in a Form

LAD
1 New Member
Using Access 2003 on Windows 2000.
My Skill Level: Med Low (Some VBA, okay with Access)
Form: Single View - based on Query of single Table to sort by field.

Application: Dealers email 'contract packages' that include as attachments: a contract (PDF or TIF), a pricing tool (Excel), a companion document (Word). Clerks detach these files into a shared drive file on our intranet.

I'm building an 'contract package management' application that needs to open the different documents for viewing only from within an Access Form. I use a multi-tabbed form. The user will capture information on the first tab, then on the following tabs I'd like the user to be able to:

- easily add a link (in a text box) to the appropriate "pdf, doc, xls" as required for each record.
- open the file using the appropriate application for viewing by clicking on the Hyperlink.
The clerks are checking the documents and tracking errors in the form.

I have added a Hyperlink field in a table (ContractPackag es) for each of the documents (Contract, Pricer, CompanionDoc).

I added Controls (same name as fields I.e Contract Pricer, CompanionDoc) to the Form that allows me to insert a Hyperlink to the file.

I have control over naming conventions for the files and paths of the documents. There are no blanks in the filename or path.

All Hyperlinks that I insert into the Control do not work.

The Hyperlink works immediately after inserting it into the control using the Insert Hyperlink dialog box. I can click on it and it will open Acrobat (for example) and then the file that I'm pointing to. However, if I remove focus from the control by tabbing or clicking to another control on the form, the hyperlink will not work if I go back to the control and click on the hyperlink. The arrow changes to a 'hand' when hovering, but if, for example the control contains:

..\..\..\..\..\ Test_Contracts\ Contract.pdf

and I click on it, the control will then display:

..\..\..\..\..\ Test_Contracts\ Contract.pdf#../../../../../Test_Contracts/Contract.pdf#

and nothing happens.

The Hyperlinks work when opening the table or the query and clicking on them directly. It appears that the problem lies with the Form.

I have tried:

Changing the table field type from 'Hyperlink' to 'Text'.
Changing the form control property from Hyperlink 'Yes' to 'No'
All combinations of the above two changes.

I have updated MS Office to SP3.
I have turned Unicode compression on and off in the table field.

I have dowloaded Access DB samples of Hyperlinks in forms from tech sites and compared all of the Property Settings for the field and the control and have set mine accordingly. (The test db links work fine on my computer - both with linking to local files on my drive and to files located on the Intranet shared drive).

I have researched this on many tech sites, including here, and have found no definitive answers. I would prefer not to have to write a bunch of code to use File Open dialogs when Access provides what should be a simple solution (ha!) through the use of a Hyperlink.

Any suggestions as to what might be causing this problem?

Larry
Jan 21 '08 #1
5 8807
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi Larry

The data type of the field should be hyperlink and the full path to the file should be stored. On the form the Is hyperlink property should be set to yes. That should be working.
Feb 4 '08 #2
rdemarco
5 New Member
HI Larry

I had experienced the same problem and found that to get the hyperlink working all the time, I had to include the description part of the link. You simply do this by adding the name/description before the actual path/filename, and separate the two parts with a hash (#) symbol (no spaces). Eg:
MyLinkName#C:\s ubfolder\myfile .pdf

Hope this helps

Regards
Rob
Feb 5 '08 #3
truthlover
107 New Member
I'm having a similar problem (also using Access 2003) but what's happening is I cant get the hyperlink to open a local file. I keep getting a message saying the file name (preceeded by http://) cannot be found.

How do i get it to open a local file??

Thanks!

BTW my VBA experience is next to nothing, so please be patient with your explaination :)

HI Larry

I had experienced the same problem and found that to get the hyperlink working all the time, I had to include the description part of the link. You simply do this by adding the name/description before the actual path/filename, and separate the two parts with a hash (#) symbol (no spaces). Eg:
MyLinkName#C:\s ubfolder\myfile .pdf

Hope this helps

Regards
Rob
Feb 26 '08 #4
ADezii
8,834 Recognized Expert Expert
Using Access 2003 on Windows 2000.
My Skill Level: Med Low (Some VBA, okay with Access)
Form: Single View - based on Query of single Table to sort by field.

Application: Dealers email 'contract packages' that include as attachments: a contract (PDF or TIF), a pricing tool (Excel), a companion document (Word). Clerks detach these files into a shared drive file on our intranet.

I'm building an 'contract package management' application that needs to open the different documents for viewing only from within an Access Form. I use a multi-tabbed form. The user will capture information on the first tab, then on the following tabs I'd like the user to be able to:

- easily add a link (in a text box) to the appropriate "pdf, doc, xls" as required for each record.
- open the file using the appropriate application for viewing by clicking on the Hyperlink.
The clerks are checking the documents and tracking errors in the form.

I have added a Hyperlink field in a table (ContractPackag es) for each of the documents (Contract, Pricer, CompanionDoc).

I added Controls (same name as fields I.e Contract Pricer, CompanionDoc) to the Form that allows me to insert a Hyperlink to the file.

I have control over naming conventions for the files and paths of the documents. There are no blanks in the filename or path.

All Hyperlinks that I insert into the Control do not work.

The Hyperlink works immediately after inserting it into the control using the Insert Hyperlink dialog box. I can click on it and it will open Acrobat (for example) and then the file that I'm pointing to. However, if I remove focus from the control by tabbing or clicking to another control on the form, the hyperlink will not work if I go back to the control and click on the hyperlink. The arrow changes to a 'hand' when hovering, but if, for example the control contains:

..\..\..\..\..\ Test_Contracts\ Contract.pdf

and I click on it, the control will then display:

..\..\..\..\..\ Test_Contracts\ Contract.pdf#../../../../../Test_Contracts/Contract.pdf#

and nothing happens.

The Hyperlinks work when opening the table or the query and clicking on them directly. It appears that the problem lies with the Form.

I have tried:

Changing the table field type from 'Hyperlink' to 'Text'.
Changing the form control property from Hyperlink 'Yes' to 'No'
All combinations of the above two changes.

I have updated MS Office to SP3.
I have turned Unicode compression on and off in the table field.

I have dowloaded Access DB samples of Hyperlinks in forms from tech sites and compared all of the Property Settings for the field and the control and have set mine accordingly. (The test db links work fine on my computer - both with linking to local files on my drive and to files located on the Intranet shared drive).

I have researched this on many tech sites, including here, and have found no definitive answers. I would prefer not to have to write a bunch of code to use File Open dialogs when Access provides what should be a simple solution (ha!) through the use of a Hyperlink.

Any suggestions as to what might be causing this problem?

Larry
I provided a solution for a User who was having a very similar problem in dealing with Hyperlinks in general. Download the Test Database that I used to demonstrate how to Select Files, Write them to a Text Box as a Hyperlink, then Save them to the underlying Table as Hyperlinks. The code is very simple and uses the Office Dialog as the preferred Method of selection. Be sure to set a Reference to the Microsoft Office X.XX Object Library. Let me know how you make out. Good Luck!
Feb 27 '08 #5
truthlover
107 New Member
Ah, my friend ADesii to the rescue again :)

Ok, this is what's happened.

First I made sure the reference was set. It was because of the image button you helped me with.

Then I tested it by picking a file with the file chooser (like the one you helped me on, and is working just fine) and the link works properly.

Then I copied a path directly into the table (to make sure the table wasnt the problem) and that link worked properly.

That left me with the previously imported links giving me an error message that the file http://my local path cant be found.

So the only two conclusions I could come up with was the table wasnt properly converting the paths (which werent originally set up as hyperlinks) or something was wrong with the imported paths -- so I did a little digging...

Because of where these links came from, I assumed the paths were accurate -- That was where the error originated. The vast majority of them are wrong in some subtle way or another. Now I just have to decide whether to leave the field as a hyperlink or just text. I'm leaning toward text because no one expects functionality out of text (it still gives them an idea where to look for the file). But a hyperlink that only works 10% of the time is going to just be annoying.

I hope you (and other readers of this post) dont view the outcome of this post as a waste of time. The process is teaching me some logical steps to more thoroughly test my work, and I find that to be invaluable. I still have a long way to go, but I am learning, right?

Thanks again for all your help and patience!



I provided a solution for a User who was having a very similar problem in dealing with Hyperlinks in general. Download the Test Database that I used to demonstrate how to Select Files, Write them to a Text Box as a Hyperlink, then Save them to the underlying Table as Hyperlinks. The code is very simple and uses the Office Dialog as the preferred Method of selection. Be sure to set a Reference to the Microsoft Office X.XX Object Library. Let me know how you make out. Good Luck!
Feb 27 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4575
by: Phil | last post by:
I am looking to set up a hyperlink control on a form to retrieve letters that correspond to a record on a form. That is, there may be 100 form records, and I would like each of those form records to have a hyperlink button or control on it. that when pushed, pulls up the unique Word document associated with that form record. In this example, there would 100 unique letters associated with 100 unique form records. I tried working with...
3
4896
by: hermawih | last post by:
Please help . I want to load the contents of another rtf document by double-clicking the words . Chapter1.rtf Chapter2.rtf Chapter3.rtf ....
1
1293
by: ashoo | last post by:
Guys! I am trying to use a dropdownlist click event in my header page to link to my main page in a frameset type of form. I try to link to my main page with a hyperlink control.It works fine. But I would like to use the click event of my dropdownlist to do the samething. so I thought if could trigger the clik event of the hyperlink within my dropdownlist click event it could work. But I am not sure how to set it up.
5
2073
by: JerryK | last post by:
Hi, I am trying to put a hyperlink to a .cer (certificate) file on a form. Normally (on a ,htm page) when the user clicks on the hyperlink, the file is not recognized and the user is given the option to save the file. This is the desired result. However, when I put the hyperlink on a webform, the file is opened and it's binary contents are displayed on the screen. Does anyone know why this happens? The hyperlink is as follows:
1
2616
by: mschoup | last post by:
I have a simple aspx page(WebForm1.aspx) with a HyperLink, LinkButton, and two CheckBoxes. When I select a CheckBox and then click the LinkButton, the CheckBox retains state. When I select the CheckBox and click the HyperLink (NavigateURL set to WebForm1.aspx), the CheckBox lost it's state. I would assume that this is by design (now that I read ASP.NET in a nutshell) where it describes a HyperLink control action as 'navigates from one...
4
1939
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
0
1932
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
2
2431
by: Andy | last post by:
Hi, This is one of those things I thought should e easy... I'm programatically trying to set the navigateURL property in a hyperlink in the headertemplate of a repeater, but always get the following error "Object reference not set to an instance of an object." when referencing the hypermink in the following line.. hypAuthors.NavigateUrl = "http://www.microsoft.com"
13
42964
ADezii
by: ADezii | last post by:
Recently, there have been several questions and much confusion concerning the Topic of Hyperlinks. Specifically, Users wanted to know how to retrieve a File Name from a FileDialog Box, copy the Name to a Bound Text Box on a Form, and save the Hyperlink to the underlying Table. The code demos below will do just that: retrieve the Absolute Path of of File from a FileDialog Box, use the Base Name (no extension) as the Display Text for the...
0
8718
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9103
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7973
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5967
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3175
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2118
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.