Solved

Access: check file path in sql database

Posted on 2013-11-19
2
488 Views
Last Modified: 2013-11-19
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
Comment
Question by:HKFuey
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39659404
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
 

Author Closing Comment

by:HKFuey
ID: 39659829
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

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question