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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|