Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Display a Random Picture
Juan C Rivera 
             
5 years ago
Good Morning to all

Richard, working on a new project.  Im trying to

1 Get a number of files from a directory.  I got this done
A) files are all .jpg and of size H:1.5 V:8
2 Generate a random number and - Got this done also

here is where i'm stuck

A)Give a number to the file or pass file name?
* Im stuck here trying to set up a function to display a picture

3. Display the file in a header portion of the form and everytime the form opens a random .jpg is displayed.

What got me thinking on this was the arrays.  My thought are get a number provide the file name to the array and send the picture to the form header.  How can this be done?

Richard Rost  @Reply  
           
5 years ago
So you're just trying to display a random picture from the specified folder? Here's what I would do:

Loop through all of the JPG files in specified folder
Load them into an array
You now have the count of items
Generate a random number from 1 to X
Display that pic

One of the other members recently asked me a question about displaying images in forms too. I was going to do a TechHelp video on it since the last time I talked about images for beginners was back in 2011 so the video can use some updating. I can make this the Extended Cut. Gimme a day or two.
Juan C Rivera OP  @Reply  
             
5 years ago
Big thanks

V/r
Juan

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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: 5/9/2026 5:03:06 PM. PLT: 1s