Solved

Access: check file path in sql database

Posted on 2013-11-19
2
447 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 119

Accepted Solution

by:
Rey Obrero 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now