Solved

file presence yes or no

Posted on 2015-01-01
2
135 Views
Last Modified: 2015-01-01
in my inventory form, i have a field that has the product code, ex. 10-1234. there is a corresponding jpg file that has the same product code ex. 10-1234.jpg.  on the form is a picture frame that should load the corresponding picture. the first question is how to update the frame to match the product code and if the corresponding jpg file is not there how can i test for this in vba code.
0
Comment
Question by:cazink
[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: 40527225
assuming you know the folder path where the jpg file is

dim strPath as string, strFile as string
strPath="c:\folderName\"

if dir(strPath & me.ProductCode & ".jpg") <> "" then
   ' your code to attach the image here
   else  
   msgbox "image not found"
end if
0
 

Author Comment

by:cazink
ID: 40527267
Thank you perfect, short and sweet.
0

Featured Post

Technology Partners: 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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

737 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