PDA

View Full Version : VBA, Excel, Access file attachments



White_Nova
03-04-2008, 11:36 PM
Hi all

Heres an interesting one for you... hope you can help...

I am using Excel as a front end and Access as my data storage.
im transfering data to the database using ADO and DAO...

This all work fine but as in everything improvements are inevitable...
i would now like to attach file to each record...

I have researched a little and found that Access 2007 has the facility for attachments... i have also seen that ADO has a function called
"stream.LoadFromFileFileName"

i am however stuck when it comes to implementing this...

say the database is called "Store.accdb"
the location of the files to be attached are filex with a concatenate formula in Excel...

Please help, im pulling my hair out here...
:banghead: :banghead: :banghead: :whip

Charlize
03-05-2008, 12:13 AM
Do you want to include the file as an object or provide a link to a file. I would prefer a link (text) to reduce the size of the database. Are you want to include many files for a record or just one. And with a click of a button you could open the file or include a holder on your form for a preview.

Charlize

White_Nova
03-05-2008, 12:17 AM
Hi Again Charlize

thanks for responding so quick...
I would like to write the actual file to the database.
There will be one file per record in the database...