Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to link picture to OLE data field in VBA? 1

Status
Not open for further replies.

brimes2

Programmer
Jan 19, 2009
8
0
0
US
I have a field in a table of data type OLE Object. I can open the table in table view, right click and choose Insert Object, then choose Create From File, Linked and choose a graphic file (bmp, tif, etc.).

How do I do this in VBA code?

rs.mypicturefield...?
 
Not 100% sure if I've ever specifically tried this, but this tutorial looks promising for your purposes:

Check it out, and let us know if that is what you're looking for, or if you need to do something else.

--

"If to err is human, then I must be some kind of human!" -Me
 
Thanks for the post. It's an alternative way to do what I'm trying to do. A good Plan B.

I'd still like to store the linked file using VBA.

Brooks
 
So, you're saying you want to actually move a file from one location to another (say an "Images" folder), and THEN link to the file from your table?

If so, try looking at the FileSystemObject. You can Google FileSystemObject as well as FSO in relation to Access VBA.

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top