Solved

how to display png image in form

Posted on 2014-03-17
16
1,187 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

690 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