Solved

Access: check file path in sql database

Posted on 2013-11-19
2
502 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

615 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