Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: Access Other topics FAQ


How do I allow users to easily link graphics to records. by DaveSH
Posted: 28 Jan 01

To create a button that will allow users to link and display an image (graphics file) on a form.

1) Create a field with type OLE in your table called "picture".

2) On your form create a bound OLE frame called "OLEBound1" its control source should be the table field "picture".

3) On your form create a command button with the following code in the on click event...

Private Sub Command1_Click()
 DoCmd.GoToControl "OLEBound1"
 DoCmd.RunCommand acCmdInsertObject
End Sub

This will open the insert object dialog and allow you to browse to locate the picture file.

You will have to decide whether to "Link" (store only the path to the file) or "Embed" (store the entire file in the database).  Generally you will want to link as this keeps the size of the database down and ensures that you view the latest version of the graphics file).  With linking however if the file is deleted then you wont be able to see it in your database anymore.

You will also want to look at the properties for the ole frame to have it apear and behave the way you want.

Key properties are:

Size Mode - You probably want "zoom" or "stretch"

Autoactivate - if set to "double click" allows you to open the file in the native application for viewing and editing by double clicking the frame on the form.

Display Type - Content shows the actual picture as opposed to an icon.

If you create a report, you can place an OLEframe on it also.  The properties available for the frame on the report work the same as those on the form.

Back to Microsoft: Access Other topics FAQ Index
Back to Microsoft: Access Other topics Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close