473,503 Members | 9,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trap hyperlink error message

Hi All,

I have two hyperlinkfields in my database. Both fields have to point to
different folders. One is called "IN" and the other "OUT".
Access can have only one hperlinkbase. That's why I added some code for
the click event, namely:

Private Sub link_Click()
Dim str As String
If Not IsNull(Me.link) Then
str = Me.link
Application.FollowHyperlink "In\" & str
End If
End Sub

This way I can have the files in different folders and still open them.
The problem, however is that I cannot get rit of this error message of Access
saying It cannot open the specified file.

Any thought,

Marco
The Netherlands
Nov 13 '05 #1
1 2254
Krechting wrote:
Hi All,

I have two hyperlinkfields in my database. Both fields have to point to
different folders. One is called "IN" and the other "OUT".
Access can have only one hperlinkbase. That's why I added some code for
the click event, namely:

Private Sub link_Click()
Dim str As String
If Not IsNull(Me.link) Then
str = Me.link
Application.FollowHyperlink "In\" & str
End If
End Sub

This way I can have the files in different folders and still open them.
The problem, however is that I cannot get rit of this error message of Access
saying It cannot open the specified file.

Any thought,

Marco
The Netherlands


Check out HyperlinkPart

h = "Test.Doc#C:\Test\Test.Doc"
? hyperlinkpart(h,acDisplayedValue)
Test.Doc
? hyperlinkpart(h,acDisplayedValue)
Test.Doc
? hyperlinkpart(h,acAddress)
C:\Test\Test.Doc

You should be able to manipulate the address to point to the folder you
want.

Actually, MS's hyperlink implementation sucks in several areas. You'd
probably be better off parsing out the display from the address and then
modifying the OnClick to open the file based on the address.
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
323
by: Marco Krechting | last post by:
Hi All, This is a response on my earlier posting about trapping the standard access error message when you click on a hyperlink field and the file cannot be found. I know now how to work on the...
5
3508
by: bobdydd | last post by:
Hi Everbody I am trying to trap the error that SHOULD occur when there is no internet connection. Private Sub CmdPayHere_Click() On Error GoTo Err_CmdPayHere_Click...
9
2789
by: Leigh Kendall | last post by:
I can't find any issue in the MS KB, but I'm experiencing the following problem which seems to be specific to IE5, and NOT any other version of IE 5.5+ or NN 6+. Issue: I'm using an asp.net...
5
6682
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below...
1
2029
by: marc-andr? | last post by:
Hi, I have to loop on each control on a webforms... I use this function : public void LoopOnAllControls(ControlCollection coll) { foreach (System.Web.UI.Control ctrl in coll) {
2
4569
by: AlastairHardwick | last post by:
Hi, Wonder if you can help? I have an Image Management Database which holds various information relating to Ghost Images and Testing. I am using a textbox with a hyperlink to display the path...
3
3679
by: keithb | last post by:
Using a GridView, I get a "Specified cast is not valid" error when binding the Visible propery of a hyperlink control to a DataTable text field. The error goes away if I replace the data binding...
6
5651
by: vspsdca | last post by:
Hi, I'm a newbie here and does not really have any formal training on VBA. I just need help to get my hyperlink to work. I have a form in MS Access with a browse button where a user can select a...
1
9783
NeoPa
by: NeoPa | last post by:
Error 7980: The HyperlinkAddress or HyperlinkSubAddress property is read-only for this hyperlink I'm struggling with some code to update Hyperlinks in my table. The field is defined as a...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
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...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
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...
1
6975
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...
0
4666
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...
0
3160
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...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.