Zooming in on a Form Image

PRD

Registered User.
Local time
Today, 11:33
Joined
May 18, 2011
Messages
72
Hello, I created a Form where I display a JPG image using the following code:


Me![DRImageFrame].Picture = Me.[DRIP]


This works great.

If I view the same JPG using "Windows Picture and Fax Viewer” I am able to zoom in on the image. And so my question is, is there a way I can zoom in on the JPG image from within the Access Form? Thank you.
 

I think I found a solution to my problem but I need one more piece of information...


I created a Command Button ("CBZOOM") on my form and assigned the Hyperlink Address a value of "C:\Photos\07999.jpg". When I click on the Command Button it displays a Windows Internet Explorer image which I can zoom in and out by clicking "CTL +" and "CTL -" (exactly what I want to do).


The next step is to change the Command Button's Hyperlink Address using the following code in the Event Procedure of the Form's "OnCurrent" property (note the image path is stored in the record in a field called "DRIP")...


Me![CBZOOM].["Hyperlink Address"] = Me.[DRIP]


However when I run the program I get the following error because it doesn't recognize "Hyperlink Address":


Runtime error '438': Object doesn't support this property or method.


I have also tried...


Me![CBZOOM].Hyperlink = Me.[DRIP]

Me![CBZOOM].Address = Me.[DRIP]

Me![CBZOOM].[Hyperlink Address] = Me.[DRIP]

Me![CBZOOM].Hyperlink Address = Me.[DRIP]


But all give me the same error. And so my question is, can anyone tell me what the correct "Property" name is which will allow me to change the Hyperlink Address? Your help would be greatly appreciated as I'm almost there. Thank you for your time.
 
When you're writing code, make use of Intellisense. It gives you a drop-down list of properties and methods associated to an object as you type. To get this feature for your button type like is,

Me.CBZOOM.

Note the dots I used. As soon as you type a dot a list of properties become visible.

I would advise you look into the Application.FollowHyperlink method as opposed to using the Hyperlink property of a button.
 
vbaInet -

Thanks for the advice (I am still rather new at using Access). I did a little more research and I think Property name I am looking for is "HyperlinkAddress" (one word). I will give it a try on Monday and also look into your Application.FollowHyperlink suggestion. Thanks again for all of your help.
 
vbaInet -

Just wanted to let you know that the following code worked great (and thanks for the tip regarding Intellisense)

Me.CBZOOM.HyperlinkAddress = Me.DRIP

You guys rock!
 

Users who are viewing this thread

Back
Top Bottom