Solved

file presence yes or no

Posted on 2015-01-01
2
134 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

763 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