Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 513
  • Last Modified:

Access: check file path in sql database

Does anybody know an easy way to verify a file path?

I have a Db with Part Number and Path to image. I want to verify the path to image is correct.

E.g Part1 P:\Product Images\2013\image.bmp
0
HKFuey
Asked:
HKFuey
1 Solution
 
Rey Obrero (Capricorn1)Commented:
you can use the dir() function

if dir("P:\Product Images\2013\image.bmp")<> "" then
    msgbox "File Exists"
    else
    msgbox "File Not Found"
end if
0
 
HKFueyAuthor Commented:
Thanks for the help ended up using FSO
    Dim fso As New FileSystemObject
    If FileOrDirExists(OBText) Then
    Rst.Edit
    Rst!OK = "Y"
    Rst.Update
    End If
    Set fso = Nothing

Function is here:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=559
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now