Popup Photo Enlargement

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I would like to click an a small picture for a product
and have another window open with an enlarged view.

How is that coded? So far I have been able to get a new
form to open with only the first picture in the entire
database. How do I link the correct record and field?

Thanks for the info.
 
Your picture should be in an image control (see toolbox). In the Tag property
(Other tab of properties) type in Small. Then put this code in the OnClick event
of the image control:

Select Case Me!NameOfImageControl.Tag
Case "Small"
Me!NameOfImageControl.Tag = "Big"
Me!NameOfImageControl.Height = "2880"
Me!NameOfImageControl.Width = "2880"
Case "Big"
Me!NameOfImageControl.Tag = "Small"
Me!NameOfImageControl.Height = "1440"
Me!NameOfImageControl.Width = "1440"
End Select

Note: 1440 and 2880 are twips where 1" = 1440 twips

With the above code, clicking on the small image will enlarge the image to 2" by
2". Then clicking on the large image will reduce the image to 1" by 1"
 
I think there's code that you'll find useful in the sample databases at
http://accdevel.tripod.com which illustrate three approaches to handling
images in Access.

Exactly how you are displaying the pictures will determine the method, but,
yes, you can pass the identity of the particular one to the form you are
opening.

Larry Linson
Microsoft Access MVP
 
Hi Larry,

What I am trying to do is a lot less complicated than
what I found on the site you recommended.

Basically what I am trying to do is this:
- I have a contuous form, Employees, for employee info
- One of the fields is a bound object frame named
EmployeePhoto
- The EmployeePhoto field is filled by cutting and
pasting a jpg into the control on a form
- I want to click the photo in a given record which
will open a popup form, ZoomPhoto, and pass the picture
data to the newly opened form

I have based the form, Employees, on a query, although it
was just another failed attempt to make this work. It
seems straightforward to me, but I get a "type mismatch"
error.

Thanks again,

Mark
 
Back
Top