Automating importing of OLE Objects...

  • Thread starter Thread starter Brett Davis
  • Start date Start date
B

Brett Davis

Hello...

I want to be able to click a button on a form and naviagate to the folder
where my jpg file resides and then I want to import that jpg file into my
database via the same process. I already have a field set up of data type
OLE Object. Can anyone point me in the direction that I need to look... any
help would be appreciated. I am using MS Access XP.

Please Advise..

Cheers!

Brett
 
Hi, Brett

It looks to me that you need to supplement the built-in Acces
features with what is known as a Windows' API call. The one you nee
is "GetOpenFileName" and details can be found on the followin
web-site
http://www.mangovision.com/vbapi/ref/g/getopenfilename.htm

Follow the example, which I hope you can, making changes as necessary
You will end up with a dialogue box for selecting the file you wish
Then its a matter of taking the returned filepath/name/filetyp
string and equating it to your field

This last step is covered by the following MS KB article
http://support.microsoft.com/kb/q148463 (I'm sure the same principle
apply to your XP version)

Hope you get it all working

All the best
Graham
 
Back
Top