Douglas,
That exact coding produced errors but I did do the following ways and I
still get the "File/Directory Not Found" on the ones that have valid links to
the directories (The links to files work perfectly! I am still doing
backflips over this!)
Here are the three different ways I've tried:
Your exact coding kept producing errors -
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress))) = 0 Then
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress), acDirectory))
= 0 Then
Me.Text83 = "File/Directory not found"
Else
Me.Text83 = "Directory confirmed"
End If
Else
Me.Text83 = "File confirmed"
End If
End Sub
So I fixed it to do this (No errors in the codings and the report ran) -
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress))) = 0 Then
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress, acDirectory)))
= 0 Then
Me.Text83 = "File/Directory not found"
Else
Me.Text83 = "Directory confirmed"
End If
Else
Me.Text83 = "File confirmed"
End If
End Sub
And this way (No errors and report ran) -
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress))) = 0 Then
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acDirectory))) = 0 Then
Me.Text83 = "File/Directory not found"
Else
Me.Text83 = "Directory confirmed"
End If
Else
Me.Text83 = "File confirmed"
End If
End Sub
Then lastly, out of desperation, broke them up into two separate If
Statements thinking maybe that was why it wouldn't work originally....
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress))) = 0 Then
Me.Text83 = "file not found"
Else
Me.Text83 = "File confirmed"
End If
If Len(Dir(HyperlinkPart(Me.Scanned_JE_Link, acAddress, vbDirectory)))
= 0 Then
Me.Text83 = "Directory not found"
Else
Me.Text83 = "Directory confirmed"
End If
End Sub
I am so sorry to keep pestering you - But I'm so close I can taste it so...
I'm like a dog with a bone; I won't let go until it's done =)
VF