Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Photos in a Form

Status
Not open for further replies.

bill1856

Programmer
Sep 5, 2005
18
US
I've looked but haven't found an answer to this particular question yet:

I have a form which currently displays one linked photo based on a report number (Report number 3 finds 3.jpg) There is the potential, however, for more than one photo to be associated with a report. Is there anyway to display all the photos? For example, display three photos from report number 3 named 3a.jpg, 3b.jpg, 3c.jpg

Thanks.

 
Yes it's possible. You'll have to work out the code...but I would do something like this:

Add to buttons (Next and Previous) directly under/beside you image control. Set them to be hidden by default.
Use the OnCurrent event of the form (or OnLoad, etc depending) to check and see if there is more than one image. If there is, show the two buttons. Using the OnClick of the buttons, determine the current path for the image, increment/decrement as necessary, and set this new path for the image control.

This allows the user to "scroll" through the different images, but you only have to allow screen space for one. You might also want to place a label that lists how many picutres there are, etc.

Let me know how you fair and if you get stuck...

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top