Hexepeth
Nov 27 2004, 04:41 AM
Hallo,
How can i insert a image (jpg) by VBA? So clicking on a OLE object field should pop-up a browse for jpg screen and after selecting image and clicking OK the image should be inserted into the field.
Also: would it be possible to check the file size (<= 50 kb) or image size (e.g. <= 85x113) on inserting the image in the db and show a message box if either of the values is off.
Thanx for any tips.
Regards,
Harmannus
ScottGem
Nov 27 2004, 05:22 AM
It is not recommeded that images be stored in a database. This can close databases to bloat in size. The recommended method is to store the path to the image file in a text field. Then use an Unbound Image control on forms and reports to display the image. This is done by using the On Current event (On Format for reports) to assign the path to the Picture property of the control
i.e; Me!imgPic.Picture = Me!txtimgPath
There is a demo of this technique on Candace Tripp's site.
HTH
Hexepeth
Nov 27 2004, 05:26 AM
Hallo,
Thanx for the reply. I will have a look at here site!
Regards,
Harmannus
ScottGem
Nov 27 2004, 06:07 AM
glad to assist
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.