Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Numbered Images < Images Subfolder | VBA Editor Colors >
Numbered Images
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   2 years ago

Display Numbered Images Based on Field Value


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Join Now

In this Microsoft Access tutorial, learn how to display product images automatically by linking image files with corresponding ProductID fields.

Quentin from Clifton, New Jersey (a Platinum Member) asks: Thank you for yesterday's video on displaying images in a subfolder of the database folder; that's very helpful. I have a situation where all of my products have pictures associated with them, and the name of the file is equal to the ProductID.JPG. Is there any way I can display those images based on that data instead of having to put a filename in a field?

Members

There is no extended cut, but here is the database download:

Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the files from class plus get access to the Code Vault. If you're not a member, Join Today!

Prerequisites

Recommended Courses

Learn More

FREE Access Beginner Level 1
FREE Access Quick Start in 30 Minutes
Access Level 2 for just $1

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates

Resources

Diamond Sponsors - Information on our Sponsors
Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted
Merch Store - Get your swag here!

Questions?

Please feel free to post your questions or comments below or post them in the Forums.

KeywordsNumbered Images in Microsoft Access

TechHelp Access, Display Images in Database, Link Image Files ProductID, Automatic Image Display in Access, Image Based on Field Value, ProductID.JPG Association, Image Object Control Source, Dynamic Image Display, Access Imaging Techniques, Image Files in Access Forms

 

 

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Numbered Images
Get notifications when this page is updated
 
Intro In this video, I will show you how to display images in your Microsoft Access forms and reports based on numbered image files, such as 1.jpeg, 2.jpeg, and so on, linked to records like product or customer IDs. You'll learn how to set up your images so the file names correspond to your ID fields, ensure all images are of the same file type, and configure your Access database to reference these images without needing to store individual file names in your tables. This technique makes managing images in your Access applications simpler and more efficient.
Transcript Welcome to another TechHelp video brought to you by AccessLearningZone.com. I am your instructor, Richard Rost. In today's video, I'm going to show you how to display images in your forms and reports based on numbered image files. For example, you have 1.jpeg, 2.jpeg, and so on, associated with a record in your table, like a customer ID, product ID, whatever.

Today's video is kind of a spin-off of yesterday's video about how to display images in a subfolder that's under your database folder. So go watch that first and the other prerequisites for this video, then come on back when you're done with that one.

Today's question comes from Quentin in Clifton, New Jersey, one of my Platinum members. Quentin says, Thank you for yesterday's video on displaying images in a subfolder of the database folder. That's very helpful. I have a situation where all of my products have pictures associated with them, and the name of the file is equal to the product ID dot jpeg. Is there a way I can display those images based on that data instead of having to put a file name in a field?

Well, yes, Quentin. Essentially, what you'll do is use that ID field or product code or whatever you've got in replacement of the file name field that we added to the table to display the image. Let me show you how to do it.

Here's the database we built yesterday. We've got our database folder, and we've got our images folder under it. Essentially, what you're going to need is images that represent some field in your table. So, if it's a product ID or product code - right, PN1024.jpeg or whatever - I'm just going to re-number these. We'll call this one 1.gif, we'll make this one 2.gif, and I know Picard is four, so we're going to make Picard four, and this one - now, this one's a jpeg.

I had three animated gifs and a jpeg.

To do this, you are going to have to have all files of the same type. You can't have some gifs and some jpegs. And yes, it's gif, people -- gif: graphic, not graphic. It's not gif. Well, longstanding debate, I just settled it. But you have to have all the same file types. So, if you have gifs or jpegs, you have to convert them all to one or the other, or this isn't going to work.

You could get a little more creative with some VB code and say, "Okay, if 4.gif doesn't exist, look for 4.jpeg." That's beyond this video. If you guys really want to see how to do that, let me know, maybe I'll make another Developer-level video for that. But at this point, if you're a beginner, you're going to have to make sure they're all the same file type. There are conversion utilities out there.

Here's a trick, by the way: you can just rename a jpeg to put a gif extension on it. If I made this 3.gif and it, and it's going to yell at you: "You want to change it?" Yeah, but you know what, it still works. If you open it up, it'll still open up just fine.

You can't go the other way with animated gifs though. Like, this is an animated gif. If you rename that to a jpeg, it won't display properly, because that's an animated gif. You're only getting part of it. That's a frame rate thing, but you can just keep it as a regular gif. I do believe you can do that with non-animated ones, but not animated ones.

Make sure you have them all the same file type: jpeg, gif, png - the different file types that Access supports. I recommend either jpeg, gif, or png.

Once you've got these all numbered and associated with your records, you can go into your database, and we no longer need that file name field - that profile picture field. Get rid of it there, delete, goodbye. Close it, save it. You can get rid of it out of the form, too. Delete that, make this bigger like that. There you go.

Now, let's bring up this image object's properties and, right here, I've renamed it. Let's call this an image object, or whatever.

Now, the control source - I'm going to click on here, Shift+F2 to zoom in. Instead of profile picture, we can put the customer ID there, and then make sure at the end, you tack on .gif or .jpeg, or whatever your file type is. Click OK. Now, we can close that, close, save, and open it. There we go. Look at it.

Maybe the Access team will make it display animated gifs in the future.

There's two. There's three. There's four. If you have a product with the product number, you just have to make sure that you name the image files appropriately. That's all.

That's pretty much it. Simple and straightforward. You just have to make the file name in the image object represent the data that you've got in your image folder.

If you like working with images and want to learn more about them, I've got an imaging seminar where I cover all kinds of stuff about images: lots and lots of different stuff. I show you how to make an imaging server where you can browse for files, and then it'll upload them to the server folder for you automatically. All kinds of stuff.

Editing images right in place inside your database, lots of cool stuff. I will put a link to that down below.

And that's going to be your TechHelp video for today. I hope you learned something. Live long and prosper, my friends. I'll see you next time.
Quiz Q1. What is the primary goal of the technique shown in the video?
A. To store images directly in an Access database table
B. To display images in forms and reports based on numbered image files matching a table field
C. To print images from a report to a PDF file
D. To export table data to image files

Q2. In order for this technique to work correctly, what must be true about the image files?
A. They must all be of the same file type, like all .jpeg or all .gif
B. They must be in different formats to match each product
C. The file extension does not matter
D. Animated gifs are required for all images

Q3. If you want to use the product ID to reference an image, how should the image files be named?
A. By the product name
B. By the product ID followed by the appropriate file extension (e.g., 1.jpeg)
C. By the customer's name
D. By a random string of characters

Q4. What should you do if your image files are currently in different formats (e.g., some .gif and some .jpeg)?
A. Use each file as is
B. Convert them all to the same image type before linking in Access
C. Rename them randomly
D. Only use the jpeg files

Q5. What change is recommended for the database design when using this method of image display?
A. Add a new field for image captions
B. Remove the old profile picture field and use the ID field to construct the file path
C. Duplicate the image file in multiple folders
D. Change all data fields to text

Q6. What aspect of animated gifs does Access currently not support well according to the video?
A. Showing the gif as a background
B. Displaying the animation; only a single frame is shown
C. Printing animated gifs
D. Resizing animated gifs automatically

Q7. What does the control source property of the image object need to include for this technique?
A. The entire path and file name typed in manually
B. A formula combining the ID field and the correct file extension
C. Only the file extension
D. A static image file name

Q8. If a user wants to make Access check for both .gif and .jpeg versions of an image, what did the instructor suggest?
A. There is already a built-in feature for this in Access
B. Use advanced VB code to check for different file types
C. Rename all files to match both extensions
D. Store the image inside the table

Q9. Why might someone want to eliminate the profile picture field from their table using this technique?
A. To reduce database size and redundancy
B. Because Access cannot use fields to store picture file names
C. To make every record identical
D. To increase the number of fields in the table

Q10. What does the instructor recommend if you want to learn more about advanced imaging techniques in Access?
A. Search for free images online
B. Watch his imaging seminar
C. Use macros instead
D. Download an external photo editor

Answers: 1-B; 2-A; 3-B; 4-B; 5-B; 6-B; 7-B; 8-B; 9-A; 10-B

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's TechHelp tutorial from Access Learning Zone will focus on displaying images in your Microsoft Access forms and reports based on numbered image files. These could be files like 1.jpeg, 2.jpeg, and so on, which line up with a record's primary key or some other unique identifier like a customer or product ID.

This technique is a follow-up to my previous lesson on showing images stored in a subfolder beneath your Access database folder. If you have not seen that video yet, I suggest you do so before continuing here, as this tutorial assumes you're familiar with those concepts.

Let's look at the scenario for today. Suppose, for example, all of your products have photos, and the file name for each image matches the product ID, with a .jpeg (or .gif, .png, etc.) extension. Instead of maintaining a separate field in your database that stores the file name, you want Access to automatically associate image files using the product or customer ID.

This is a very convenient setup. To do this, start by ensuring that your image files are located in a consistent folder structure, such as an Images folder inside your main database folder. The files themselves must be named so that each one matches a corresponding ID from your table - for instance, ProductID 1 should have an image named 1.jpeg.

One important point is that all your images need to be of the same file type. Access cannot dynamically handle different formats for the same image control without additional coding. If you have some pictures as .gif, others as .jpeg, and so on, you will need to convert them all to the same file type. There are many free tools online to batch-convert images if needed. If you are feeling creative, you could use some VBA code to check for different extensions, but that is outside the scope of this lesson.

If you are in a pinch, you can rename a .jpeg file to .gif by simply changing the extension, and it will usually still display correctly for basic (non-animated) images. However, you cannot safely rename animated gifs to a different type and expect them to work; animated gifs lose their motion if you simply change their extension.

So, pick a file format - jpeg, gif, or png are all supported by Access - and make sure every image is named according to the related record's key field and stored in the proper folder.

Once your image files are organized, you can return to your table design in Access. Since the image file name is based on the ID, you no longer need a separate field in your table to store the image name. Go ahead and delete any file name or profile picture fields you previously used for this purpose, both from the table and from any associated forms.

With the field removed, adjust your image control on your form. Access the properties for your image object, and in the control source, enter an expression that builds the image file's path using the ID field from your record, plus the correct file extension (.gif, .jpeg, etc.). This tells Access to display the image that corresponds to the current record's ID automatically.

Once everything is set up, as you move through your form records, Access will pull the photo for each one provided the image file is correctly named and stored in the right spot. If you ever want to move beyond these basic techniques and try things like dynamically searching for multiple file types, or editing images directly within your database, I offer an in-depth imaging seminar where I cover these topics and much more. You can find a link to that seminar below.

That covers today's TechHelp tutorial. For a complete video walkthrough and step-by-step demonstration of everything discussed here, visit my website at the link below. Live long and prosper, my friends.
Topic List Displaying images in forms and reports based on record IDs
Organizing image files in a subfolder under the database
Ensuring image file names match record IDs
Converting all images to a single file type
Removing the filename field from tables and forms
Setting the image control source to use the ID with file extension
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 1/15/2026 5:14:16 PM. PLT: 1s
Keywords: TechHelp Access, Display Images in Database, Link Image Files ProductID, Automatic Image Display in Access, Image Based on Field Value, ProductID.JPG Association, Image Object Control Source, Dynamic Image Display, Access Imaging Techniques, Image Files i  PermaLink  Numbered Images in Microsoft Access