Solved

how to display png image in form

Posted on 2014-03-17
16
1,128 Views
Last Modified: 2014-04-09
hey guys, i have a test database where i'm trying to display a png image in my form. i'm not sure why but i only see the icon instead of the picture itself. i went to search on supported formats and png is indeed a supported format.

here's my empty database with just the table, form and image. could yall help me out? thanks! = )
Pictures.mdb
0
Comment
Question by:developingprogrammer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 8
16 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39933791
It looks like this on my machine.snapshot
0
 

Author Comment

by:developingprogrammer
ID: 39933811
Oops sorry I attached the wrong photo!! Reattaching in 15 min when I get back to my computer!!
0
 

Author Comment

by:developingprogrammer
ID: 39935913
hey guys, here's the correct database where i can't get the png file to show. could yall help me take a look? thanks!! = )
Pictures.mdb
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 500 total points
ID: 39939520
When a user inserts a file using OLE Embedding (eg a png picture - which is what you are doing), Access attempts to invoke the application that is registered for that file-type/extension, and have it store the 'Object' using OLE mechanisms.  Only a few graphics applications support this functionality, and if the registered application does not, a default 'Package' is created (which cannot be displayed directly on a form/report).

In order to display the picture, Access attempts to invoke the application that was used to initially store the object.  If this application is not correctly installed & registered on the user's system, the image will display as an icon.

for more info read this article http://www.ammara.com/articles/accesspictureole.html#S3
0
 

Author Comment

by:developingprogrammer
ID: 39949511
hrmm i see. thanks for your sharing MacroShadow.

what do you then think is the best way to display this image? i'm thinking put it as the background of a form. is there a better way you can think of? thanks once again in advance!
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39949583
It's not a question of how you display the picture but rather how the picture is stored. In the aforementioned article you will see there are several ways to store pictures.
0
 

Author Comment

by:developingprogrammer
ID: 39957987
i see, apologies MacroShadow i must have missed that out! let me go through it again. thanks!! = )
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39958116
No problem.
0
 

Author Comment

by:developingprogrammer
ID: 39984894
hi MacroShadow, my apologies for the delay in response!

i read through the article twice and was trying to understand how to fix this situation.

like what you said - "In order to display the picture, Access attempts to invoke the application that was used to initially store the object.  If this application is not correctly installed & registered on the user's system, the image will display as an icon."

what i did was:

1) press print screen
2) open paint
3) press ctrl + v
4) save the image as a png on my desktop
5) double click the image (this opens using Windows Photo Viewer)
6) save the image in my Access database table

what i thought would happen was - since the png file is registered with Windows Photo Viewer, Access would invoke Windows Photo Viewer to display the picture.

however Access is not and it shows as an icon.

so MacroShadow, how can i tell Access to use Paint or Windows Photo Viewer to display the picture?

thanks for your help once again and your very long patience with me!!
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39985167
What happens if you try it with a bmp instead of png?
0
 

Author Comment

by:developingprogrammer
ID: 39985340
whao MacroShadow, you're a genius!! it works!!

i guess now for the more in-depth part - why does it work? is it because it's raster not vector so anything can open it?

thanks for your insight and solution MacroShadow! most interested to find out and learn the why behind it = )
0
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 500 total points
ID: 39985348
0
 

Author Comment

by:developingprogrammer
ID: 39985410
hrmm MacroShadow, i went through the article and as per the previous post, i thought (like what you shared) because Paint was the programme used to initially store the object that Paint would be invoked to open the object too. hrmm. i still don't understand it but now i know that the solution is to store it as a bmp = ) thanks MacroShadow!!!
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39985592
No problem.
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39985593
Only a few graphics applications support this functionality
I guess Paint isn't one of them.
0
 

Author Comment

by:developingprogrammer
ID: 39988078
ok thanks once again MacroShadow! = )
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question