What is OLE object and how do I add a picture

G

Guest

I have a FIELD that I want to import a .jpg picture. The database is for
household inventory and the PHOTO FIELD is where I would like to import a
..jpg file that is the photo of the inventory item. How do I do this?

What is an OLE object?
 
P

PC Datasheet

First of all, store your pictures in a separate folder named
InventoryItemsPics.

Add a field named MyPath to your table. Include this field in the
recorsource of your form. Add a textbox named MyPicture to your form. Set
the ControlSource as MyPath. When you enter a new inventory item to your
database you will enter the path to the picture of the item in this textbox.
Comething like:
C:\InventoryItemsPics\MyInventoryItem,jpg
Add an image control named PhotoField to your form. Open properties and
under the Format tab set the Size Mode property to Stretched. Put the
following code in the AfterUpdate event of MyPicture textbox:
Me!Photofield.Picture = Me!MyPicture
Put the following code in the Current event of your form:
Me!Photofield.Picture = Me!MyPicture

That should do it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top