Detach an OLE 'Microsoft Photo Editor' Photo

I would like to know how to detach a 'Microsoft Photo Editor' Photo that was embedded into an OLE field in an Access 97 Table.  I would then like to save this file, giving it the name of one of the other fields in this same table.  Can this be done?  And how can I then display this photo with just a text field that contains the path to this file.  
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1. To save the file you can use the following code: (not so elegant, but works)

     Me.Pic.Action = acOLEActivate
     SendKeys "+{TAB}%FA+{END}{DEL}C:\temp\temp.gif%s"
     SendKeys "+{TAB}%{F4}"

in this example "Pic" is OLE field, and the file name "C:\temp\temp.gif" you should exchange by your taken from other field. Before you do this, check if is file with this name exists.

2. to show this picture create on the form Image control, and use the code like this:

Me.Image1.Picture = "C:\TEMP\Image1.jpg"

(File name exchange with taken from the text field in your table)

Good luck.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TerryEllisAuthor Commented:
Thank You.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.