Question : MS Access add image to form at runtime

Hi

I have a form where I need users to be able to add an image.  The image will ideally need to be stored within the db rather than locally via file path.  Because of this it would also be useful if there could be some restriction on size of image file to be used ie if it is above a certain size user gets message saying file too big.

What would be the easiest way of doing this?

Many thanks

Answer : MS Access add image to form at runtime

Here are two sample databases for storing images.  

This one links to images stored outside of the database which is preferred to the second method because Access is not good at storing images within it:
www.thenelson.name/#LinkedImageDemo

This one stores the images within Access as OLE objects.  
www.thenelson.name/#ImbededImageDemo
It is ok to do this for very small images such as icons but will rapidly bloat the database to unusable size if used for larger images.  Here is a link of someone who was trying to fix a database that has bloated with Word and Excel OLE objects: www.experts-exchange.com/Q_21538911.html.

Here are references for storing images within Access as Blobs. Does not create bloat.
en.wikipedia.org/wiki/Binary_large_object  General discussion about Blobs
www.lebans.com/loadsavejpeg.htm  Free code to use blobs in Access
www.ammara.com/  Excellent addin to support image blobs Costs $100-300

And here is an article about the comparable merits of the three different image storage methods.
www.jamiessoftware.tk/articles/handlingimages.html
Random Solutions  
 
programming4us programming4us