Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2011, 02:07 PM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default displaying tif images

Hi there
I have a form on which I need to display some *.tif images from a table.
Unfortunately the Image control does not support the format. After extensive research i have figured out that I need to embed the Windows Image and Fax Viewer by using the Preview 1.0 Type Library. I have referenced the library in the VBA Editor > Tools > References. Then I did this:

Preview1.ShowFile "C:\db_Images\Acustic\Autozorb II - btm 1kx 03826.jpg", 1

But I'm getting an error: Object required.

I understand there is no such object as Preview1 on my form. How do I insert it please ?
 
Old April 5th, 2011, 04:13 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

You will need to insert the Active X object on your form. Depending on the version of Access you are using the exact steps very. The basic steps are that you select Insert > ActiveX > browser for it.

Note: You may also be able to use the Web Browser Control. I use it a lot on forms for display files.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old April 6th, 2011, 10:32 AM
JP JP is offline
Authorized User
 
Join Date: Apr 2008
Posts: 57
Thanks: 1
Thanked 3 Times in 3 Posts
Default

If the image is a *.tif file, why is the image extension "jpg"? If it is a JPEG then you could use a standard image control.
__________________
Regards,
JP
JP SoftTech
 
Old April 6th, 2011, 04:25 PM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So the Browser Control is not displaying .tif either.
Unless I'm doing something wrong here:

Forms!scm_data!WebBrowser6.Navigate Forms!scm_data!networkpath

And the current networkpath value is:
C:\db_Images\Acoustic.orig\Autozorb II - btm 1kx 01824.tif

I'm getting:
1.The form is asking if I want to download the file.
2.Navigation to the webpage was canceled

Regards

Peter
 
Old April 13th, 2011, 02:40 PM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The answer is: use MODI
 
Old April 13th, 2011, 02:59 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Yes MODI will work.

With MODI, I have a deployment issue. I don't know if it will be installed on the target machine. I also use the Access runtime a lot so it usually is not installed.

With the (IE) web browser I have not had a single machine where it was not installed.

Another great option is DBPix
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying images chandan121 JSP Basics 0 May 1st, 2008 09:59 PM
Displaying images...... kethireddy435 ASP.NET 2.0 Professional 0 September 16th, 2007 09:25 PM
Converting TIF images to PDF Zeus_Man Crystal Reports 0 October 4th, 2006 10:50 AM
Images not displaying Penn_Clark Dreamweaver (all versions) 3 February 21st, 2006 12:59 PM
Displaying images inbox Classic ASP XML 2 May 4th, 2005 03:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.