473,765 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

need to trap hyperlink error message

Hi All,

Sorry but I have to create new message since it cannot find the old
message to send a reply. Coming back to this hyperlink thing I will
try to explain the real problem cause I think we are going in circles.

I have a continous form with a hyperlink field on it. Normally when
you click on a hyperlink field Access will follow the Hyperlinkbase
set in the database.
This is for example in my case "I:\". However I have two different
hyperlink fields in my database. One of them has documents in "I\In"
and the other in "I\Out". So I thought lets add the direction to the
proper folder in the code (see below). That does work by the way. The
only problem is that Access, after opening the word.doc, comes up with
a error message that it could not find the document. That logic
because it is looking in "I\". But I already worked around that by
building this code.

The big Q is how do I get rit of this error message?
Private Sub HYPERLINK_Click ()

Dim str As String

If Not IsNull(Me.HYPER LINK) Then
str = Me.HYPERLINK
Application.Fol lowHyperlink "In\" & str
End If

End Sub

Regards,

Marco
Nov 13 '05 #1
4 4394
Marco Krechting wrote:
Hi All,

Sorry but I have to create new message since it cannot find the old
message to send a reply.
You can always use Google Groups. Set the search to Advanced. Enter
*Access* in the groups. Enter either your name or your e-mail address
in the From part.

Most newsreaders allow you to do a search. If you can't do that, you
may never find this response let alone your initial message.

Coming back to this hyperlink thing I will try to explain the real problem cause I think we are going in circles.

I have a continous form with a hyperlink field on it. Normally when
you click on a hyperlink field Access will follow the Hyperlinkbase
set in the database.
This is for example in my case "I:\". However I have two different
hyperlink fields in my database. One of them has documents in "I\In"
and the other in "I\Out". So I thought lets add the direction to the
proper folder in the code (see below). That does work by the way. The
only problem is that Access, after opening the word.doc, comes up with
a error message that it could not find the document. That logic
because it is looking in "I\". But I already worked around that by
building this code.

The big Q is how do I get rit of this error message?
Private Sub HYPERLINK_Click ()

Dim str As String

If Not IsNull(Me.HYPER LINK) Then
str = Me.HYPERLINK
Application.Fol lowHyperlink "In\" & str
End If

End Sub

Regards,

Marco


Well, I asked if you would do a Debug.Print on "In\" & str so you could
see the result.

At least you provided some more info this time. So you set the path to
"I\". Having worked for a few years on computers, I guess you aren't
working on Windows. Are you working on Linux, Unix, or some proprietary
operating system? Usually one would expect "I:\" where the colon
separates the drive from the folder.

Let's assume the file name is called Test.Doc. In your code you
concantenate "IN\" with "I\Test.Doc ". The net result is "IN\I\Test.Doc" .

Again, this must be a proprietary operating system. It does not follow
normal Windows/Dos file name specifications. Nor does it follow
relative addressing name structures.

I would perhaps read how a filename path is created in some help files
or get onto google and read some directions on creating relative path
and file names, or perhaps create another message and ask how to create
a filename path and how to create a relative addressing path. Once you
have that concept nailed down you should be able to open the file.
Until then, you'll continue spinning in circles.

Also, you should learn how to do a Debug.Print and know where to look to
view the results. Check help for info on Debug. Look in your menu bars
for Immediate Window when you have a code module open once you know how
and when to use Debug.Print.
Nov 13 '05 #2
I'm working with Win XP, the drive letter "I" could be anything. Lets called
it C:\
The file Test.doc should be in the folder I:\In\test.doc.
The debug.print resulted in: I:\In\whatever. doc#whatever.do c# etc.....

BUt still my Q is how to lose the damn error message.

Marco

"Salad" <oi*@vinegar.co m> wrote in message
news:VP******** *********@newsr ead3.news.pas.e arthlink.net...
Marco Krechting wrote:
Hi All,

Sorry but I have to create new message since it cannot find the old
message to send a reply.


You can always use Google Groups. Set the search to Advanced. Enter
*Access* in the groups. Enter either your name or your e-mail address in
the From part.

Most newsreaders allow you to do a search. If you can't do that, you may
never find this response let alone your initial message.

Coming back to this hyperlink thing I will
try to explain the real problem cause I think we are going in circles.

I have a continous form with a hyperlink field on it. Normally when
you click on a hyperlink field Access will follow the Hyperlinkbase
set in the database.
This is for example in my case "I:\". However I have two different
hyperlink fields in my database. One of them has documents in "I\In"
and the other in "I\Out". So I thought lets add the direction to the
proper folder in the code (see below). That does work by the way. The
only problem is that Access, after opening the word.doc, comes up with
a error message that it could not find the document. That logic
because it is looking in "I\". But I already worked around that by
building this code.

The big Q is how do I get rit of this error message?
Private Sub HYPERLINK_Click ()

Dim str As String

If Not IsNull(Me.HYPER LINK) Then
str = Me.HYPERLINK
Application.Fol lowHyperlink "In\" & str
End If

End Sub

Regards,

Marco


Well, I asked if you would do a Debug.Print on "In\" & str so you could
see the result.

At least you provided some more info this time. So you set the path to
"I\". Having worked for a few years on computers, I guess you aren't
working on Windows. Are you working on Linux, Unix, or some proprietary
operating system? Usually one would expect "I:\" where the colon
separates the drive from the folder.

Let's assume the file name is called Test.Doc. In your code you
concantenate "IN\" with "I\Test.Doc ". The net result is "IN\I\Test.Doc" .

Again, this must be a proprietary operating system. It does not follow
normal Windows/Dos file name specifications. Nor does it follow relative
addressing name structures.

I would perhaps read how a filename path is created in some help files or
get onto google and read some directions on creating relative path and
file names, or perhaps create another message and ask how to create a
filename path and how to create a relative addressing path. Once you have
that concept nailed down you should be able to open the file. Until then,
you'll continue spinning in circles.

Also, you should learn how to do a Debug.Print and know where to look to
view the results. Check help for info on Debug. Look in your menu bars
for Immediate Window when you have a code module open once you know how
and when to use Debug.Print.

Nov 13 '05 #3
Marco Krechting wrote:
I'm working with Win XP, the drive letter "I" could be anything. Lets called
it C:\
The file Test.doc should be in the folder I:\In\test.doc.
The debug.print resulted in: I:\In\whatever. doc#whatever.do c# etc.....
Good luck. A filename like I:\In\whatever. doc#whatever.do c# is quite
unique. It appears to be concatentating both the file name and the
display name. Someday try to use Hyperlink(). Here is an example of it.

h = "Test.Doc#C:\Te st\Test.Doc" 'creates a hyperlink
? hyperlinkpart(h ,acDisplayedVal ue)
Test.Doc
? hyperlinkpart(h ,acDisplayText)
Test.Doc
? hyperlinkpart(h ,acAddress)
C:\Test\Test.Do c

You might want to search google in advanced groups for threads on
hyperlinks. I believe you don't fully understand the components that
make up a hyperlink in Access and you won't succeed until you do.
BUt still my Q is how to lose the damn error message.
Pass the your FollowHyperlink a valid filename. I don't see how you can
avoid errors when you pass invalid filenames. The phrase "Garbage in,
garbage out" comes to mind.

Marco

Nov 13 '05 #4
Marco Krechting wrote:
I'm working with Win XP, the drive letter "I" could be anything. Lets called
it C:\
The file Test.doc should be in the folder I:\In\test.doc.
The debug.print resulted in: I:\In\whatever. doc#whatever.do c# etc.....

BUt still my Q is how to lose the damn error message.

Marco


Below came from another thread. Check out Allen's link.

The HyperlinkPart() function is useful for parsing the parts of the
hyperlink. More info on how hyperlinks work in:
Introduction to Hyperlink fields
at:
http://members.iinet.net.au/~allenbrowne/casu-09.html
Nov 13 '05 #5

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

Similar topics

1
2265
by: Krechting | last post by:
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
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 field to use multiple hyperlink bases but I still need a way to get rit of this error message. Can I have a error trap at form level? Or is there another way of dealing with it?
5
3516
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 Application.FollowHyperlink "http://www.microsoft.com" Err_CmdPayHere_Click: MsgBox "Page Not Available, Check that You ARE online",
9
2811
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 hyperlink control and setting the imageurl property. It seems that when the img tag is rendered in the hyperlink (<a>) tag, the img tag is closed with a /> instead of the usual > tag. Because of this, when the hyperlink is clicked in IE5, the hyperlink...
5
6689
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 but here is the snippet of my asp:hyperlink object; <asp:HyperLink NavigateUrl="authonly/clientdetails.aspx?searchID="+<%#DataBinder.Eval(Conta iner.DataItem,"CLIENTREF")%> ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem,...
9
15022
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring = datagrid.Items(rownumber).Cells.Item(column number).Text returns a blank string. It seems to work ok for the other columns that are just regular datagrid columns, not hyperlink types. Thanks. -- Paul G Software engineer.
1
2044
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
4443
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist then skip this file and move onto the next file (line). If file is there then move to a sirectory. Here is the code I have (Feel free to make corrections as needed. If possible make changes in red)
3
3698
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 statement with "true" or "false". This code causes the error: <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("c2Hyperlink1Link") %>' Target="_blank"
1
9826
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 Hyperlink and is editable without problem from the interface (I open the table for display, right-click on an item and select Hyperlink / Edit Hyperlink and all is fine). The table is defined very simply as : Table = tblLink Field Type Index...
0
10007
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
9951
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
9832
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
8831
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...
1
7378
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5275
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...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
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
2
3531
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.