General discussion

Locked

Incorporating Images into a Database

By pjs_2000 ·
How can Incorporate Images into an MSAccess2000 Database.

It is a product Database and I wish to have an image for each product. The Help files with Access are rather daunting.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Incorporating Images into a Database

by mbarker734 In reply to Incorporating Images into ...

If you want to diplay a different .jpg image on each form you can do the following:

The table field is OLE object. The box on your form for containing the .jpg picture is
a Unbound Object Frame.

Use the Insert Object dialog box.

Select Create New, then select an
appropriate photo editor (I use Microsoft Photo Editor 3.0). This editor should be
capable of working with .jpg files. Opening the existing file in the editor and then
closing the editor should place the appropriate .jpg file on your form.

In the Format properties for you picture field on your form Size = Stretch. This will
cause the .jpg file to be scaled to fit the area of the Unbound Object Frame.

Is this process clumsy? ?? YES. Can you shorten the process? ? only slightly.
The clumsiness comes from allowing the versatility of the type of file you can insert

into the Unbound Object Frame.

First: Right clicking in the Unbound Object Frame of your form will produce a drop down box with Insert Object as an option. Steps removed none just more
convenient than the menu bar.

Second: You can install the following code on an event of the Unbound Object
Frame (I like Double Click).

DoCmd.RunCommand acCmdInsertObject

Steps removed 1.

Or if you do not like using and event in the Unbound Object Frame you can create a

Command Button with the following code.

Me!MyPicture.Setfocus
DoCmd.RunCommand acCmdInsertObject

Steps removed still only 1. Again, if you discount the one time coding step.

Personally I would opt for the command button, thus leaving the Unbound Object
Frame events for other things such as Double Click opening a true viewing
program for the .jpg file. Doing this will provide you with the ability to zoom and
scroll around on the .jpg file if you desired.

Good luck,

Mark

Collapse -

Incorporating Images into a Database

by pjs_2000 In reply to Incorporating Images into ...

Poster rated this answer

Collapse -

Incorporating Images into a Database

by pjs_2000 In reply to Incorporating Images into ...

This question was closed by the author

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums