Hi, I'm trying to open a jpeg using a wildcard in the file name. I constructed the filename in a variable called Draft. At this point the code doesn't find a file and abviously I've either tried to do something that can't be done or have made a syntaxt mistake I don't understand. Any help will be greatly appreciated. Thanks, Kopy
-----------------------------------------------------------
Dim oApp As Object
Dim picPath As String, Draft As String, Pic As String
picPath = "C:\Impact Consulting\Computer Care Associates\H G Cockrill\Drawings\"
Draft = Me.[txtPart#] & "*" & ".jpg"
If Dir(picPath & Draft, vbNormal) <> "" Then
Pic = picPath & Draft
Application.FollowHyperlink Pic, , True
Else
MsgBox "No Drawing Currently on File"
End If
-----------------------------------------------------------
Dim oApp As Object
Dim picPath As String, Draft As String, Pic As String
picPath = "C:\Impact Consulting\Computer Care Associates\H G Cockrill\Drawings\"
Draft = Me.[txtPart#] & "*" & ".jpg"
If Dir(picPath & Draft, vbNormal) <> "" Then
Pic = picPath & Draft
Application.FollowHyperlink Pic, , True
Else
MsgBox "No Drawing Currently on File"
End If