Command button to insert OLE object?

ELaJaunie

Registered User.
Local time
Today, 16:15
Joined
Sep 2, 2003
Messages
11
Okay, I have a database that requires a picture of the objects that I'm keeping track of. Now, I know how to put the pictures in manually, but I want to make a button that does the same thing for me. Say I create a command button "Insert Picture..." or something to that extent, and when I press it, I would get an open file dialogue that would only allow the user to choose .jpg or .gif files. And when they select the file, it would be put into the record. But I haven't a clue as to how to even begin this.
Help?
Please?
I'll give you a cookie.

I'm using MS Access XP for this.
 
Not a good idea to save pictures in a database because your database will become huge. Search the MS KB for Linking Pictures and you will find articles there on how to link to your pictures rather than storing them in the database. Then you can use the common dialog box to find the picture and save the path to the db instead of the picture.

hth,
Jack
 
I understand that I gotta link the pictures. I realized that after I was going through some of these old posts.

But I went through the MS KB but all I got was information about the errors from OLE objects.

How do I use the common dialog box? Again, I'm a VB newb so please bear with me.
 
This article may give you some ideas. There is also a lot of good information in Access Help under 'linked objects'. The common dialog box is an Active X control that is available from the Toolbox under More Controls. (I have the Developers Edition of Access and this Control is available, but I not positive if it comes with the standard edition of Office or not, but take a look.)

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom