A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hyperlink question



 
 
Thread Tools Display Modes
  #1  
Old October 23rd, 2007, 01:12 PM posted to microsoft.public.access.forms
AusTexRich
external usenet poster
 
Posts: 26
Default Hyperlink question

Surely Access has a way to detect if a file actually exists without having to
open each hyperlink. I'm using a continuous form and have a hyperlink to a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich
  #2  
Old October 23rd, 2007, 01:28 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Hyperlink question

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without having
to
open each hyperlink. I'm using a continuous form and have a hyperlink to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich



  #3  
Old October 23rd, 2007, 01:45 PM posted to microsoft.public.access.forms
AusTexRich
external usenet poster
 
Posts: 26
Default Hyperlink question

Thanks. That's what I'm asking. Now, do I substitute my text box name for
"FullpathToFile" or do I have to test each link individually?
--
AusTexRich


"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without having
to
open each hyperlink. I'm using a continuous form and have a hyperlink to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich




  #4  
Old October 23rd, 2007, 02:09 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Hyperlink question

Substituting a text box name would mean that you'd be able to test whatever
file name is contained in that text box. You'd still have to loop in order
to test each link.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Thanks. That's what I'm asking. Now, do I substitute my text box name
for
"FullpathToFile" or do I have to test each link individually?
--
AusTexRich


"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without
having
to
open each hyperlink. I'm using a continuous form and have a hyperlink
to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich






  #5  
Old October 23rd, 2007, 03:09 PM posted to microsoft.public.access.forms
AusTexRich
external usenet poster
 
Posts: 26
Default Hyperlink question

I put in the entire path and it worked. Expecting the same, I substituting
the text box name for "FullpathToFile" and it didn't.
--
AusTexRich


"Douglas J. Steele" wrote:

Substituting a text box name would mean that you'd be able to test whatever
file name is contained in that text box. You'd still have to loop in order
to test each link.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Thanks. That's what I'm asking. Now, do I substitute my text box name
for
"FullpathToFile" or do I have to test each link individually?
--
AusTexRich


"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without
having
to
open each hyperlink. I'm using a continuous form and have a hyperlink
to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich






  #6  
Old October 23rd, 2007, 05:00 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Hyperlink question

Take a look at what's actually stored in the text box. Hyperlinks have 3
separate parts, separated by octothorpes:

displaytext#address#subaddress

Try using the HyperlinkPart function: instead of referring to Me.MyTextbox,
use HyperlinkPart(Me.MyTextbox, acAddress)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
news
I put in the entire path and it worked. Expecting the same, I substituting
the text box name for "FullpathToFile" and it didn't.
--
AusTexRich


"Douglas J. Steele" wrote:

Substituting a text box name would mean that you'd be able to test
whatever
file name is contained in that text box. You'd still have to loop in
order
to test each link.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Thanks. That's what I'm asking. Now, do I substitute my text box name
for
"FullpathToFile" or do I have to test each link individually?
--
AusTexRich


"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you
can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without
having
to
open each hyperlink. I'm using a continuous form and have a
hyperlink
to
a
file for each record. It'd be real convenient to indicate on the
form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich








  #7  
Old October 23rd, 2007, 06:38 PM posted to microsoft.public.access.forms
AusTexRich
external usenet poster
 
Posts: 26
Default Hyperlink question

That did it. You were very informative and helpful. Thanks
--
AusTexRich


"Douglas J. Steele" wrote:

Take a look at what's actually stored in the text box. Hyperlinks have 3
separate parts, separated by octothorpes:

displaytext#address#subaddress

Try using the HyperlinkPart function: instead of referring to Me.MyTextbox,
use HyperlinkPart(Me.MyTextbox, acAddress)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
news
I put in the entire path and it worked. Expecting the same, I substituting
the text box name for "FullpathToFile" and it didn't.
--
AusTexRich


"Douglas J. Steele" wrote:

Substituting a text box name would mean that you'd be able to test
whatever
file name is contained in that text box. You'd still have to loop in
order
to test each link.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Thanks. That's what I'm asking. Now, do I substitute my text box name
for
"FullpathToFile" or do I have to test each link individually?
--
AusTexRich


"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you
can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without
having
to
open each hyperlink. I'm using a continuous form and have a
hyperlink
to
a
file for each record. It'd be real convenient to indicate on the
form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich









  #8  
Old June 24th, 2008, 04:28 PM posted to microsoft.public.access.forms
Vylent Fyre[_2_]
external usenet poster
 
Posts: 41
Default Hyperlink question

I know this is such an old post, but I am trying to do exactly this but I am
lost on where to implement this coding you provided. Please forgive my
ignorance; I am in the process of learning more about MS Access every day

Firstly, I have a table, tbl_Journal_Entries_Listings_Divisional, that
everyone types in the hyperlink in the Scanned JE Link field.

I've tried building a report and a form off of this to put your coding in
either as a button (On Click event) or even On Load / On Open and no luck.
I'm sure it's simple and I'm just not grasping the full concept of this. I
apologize for my ignorance.

What I am trying to do - I'd like to show on a report that these links ARE
valid links (file does exist/matches path name and file name) so that my
manager can see these links and know they are valid/do work. If I can't do
it on a report, I'll make do with a form if this is possible.

ANY help on this would be AWESOME.

Thank you so much!!! =)

"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without having
to
open each hyperlink. I'm using a continuous form and have a hyperlink to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich




  #9  
Old June 24th, 2008, 04:45 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Hyperlink question

Sounds to me as though you might need to put the code in Format event of the
report's Detail section.

That fires for each row of date being displayed on the report, so you can
modify an indicator to show valid or not.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Vylent Fyre" wrote in message
...
I know this is such an old post, but I am trying to do exactly this but I
am
lost on where to implement this coding you provided. Please forgive my
ignorance; I am in the process of learning more about MS Access every day


Firstly, I have a table, tbl_Journal_Entries_Listings_Divisional, that
everyone types in the hyperlink in the Scanned JE Link field.

I've tried building a report and a form off of this to put your coding in
either as a button (On Click event) or even On Load / On Open and no luck.
I'm sure it's simple and I'm just not grasping the full concept of this.
I
apologize for my ignorance.

What I am trying to do - I'd like to show on a report that these links ARE
valid links (file does exist/matches path name and file name) so that my
manager can see these links and know they are valid/do work. If I can't
do
it on a report, I'll make do with a form if this is possible.

ANY help on this would be AWESOME.

Thank you so much!!! =)

"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without
having
to
open each hyperlink. I'm using a continuous form and have a hyperlink
to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich






  #10  
Old June 24th, 2008, 08:18 PM posted to microsoft.public.access.forms
Vylent Fyre[_2_]
external usenet poster
 
Posts: 41
Default Hyperlink question

Thank you so much for your reply! I didn't think I would get a reply to this
since it's been a long time since this was posted =)

Okay - I did what you said, on the On Format event in the Details section of
the report, I put the coding in there - This is my coding and it's not quite
working... It keeps throwing up pop up boxes "File not Found" then it goes to
the debugging mode on the line If Len(Dir....

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Dir(HyperlinkPart(Scanned_JE_Link, acAddress))) = 0 Then
Let Text83 = "File not found"
MsgBox ("File not found")
Else
Let Text83 = "File confirmed"
End If
End Sub



Text83 is a text box. Do I need change this? Any suggestions? Thanks a
MILLION for your post and excellent codings; I couldn't have gotten nearly as
far as I have without everyone here




"Douglas J. Steele" wrote:

Sounds to me as though you might need to put the code in Format event of the
report's Detail section.

That fires for each row of date being displayed on the report, so you can
modify an indicator to show valid or not.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Vylent Fyre" wrote in message
...
I know this is such an old post, but I am trying to do exactly this but I
am
lost on where to implement this coding you provided. Please forgive my
ignorance; I am in the process of learning more about MS Access every day


Firstly, I have a table, tbl_Journal_Entries_Listings_Divisional, that
everyone types in the hyperlink in the Scanned JE Link field.

I've tried building a report and a form off of this to put your coding in
either as a button (On Click event) or even On Load / On Open and no luck.
I'm sure it's simple and I'm just not grasping the full concept of this.
I
apologize for my ignorance.

What I am trying to do - I'd like to show on a report that these links ARE
valid links (file does exist/matches path name and file name) so that my
manager can see these links and know they are valid/do work. If I can't
do
it on a report, I'll make do with a form if this is possible.

ANY help on this would be AWESOME.

Thank you so much!!! =)

"Douglas J. Steele" wrote:

If you're trying to determine whether or not a given file exists, you can
use

If Len(Dir(FullpathToFile)) 0 Then
' File exists
Else
' File doesn't exist
End If


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"AusTexRich" wrote in message
...
Surely Access has a way to detect if a file actually exists without
having
to
open each hyperlink. I'm using a continuous form and have a hyperlink
to
a
file for each record. It'd be real convenient to indicate on the form
whether or not the file is actually there. Is that possible to do?

Thanks
--
AusTexRich






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.