[AccessD] FYI: Good news - VBA in Office 12 and beyond...

Shamil Salakhetdinov shamil at users.mns.ru
Tue Feb 21 07:47:24 CST 2006


Martin,

Does this code means they updated DAO to support new datatype or they 
somehow worked it around without DAO patching?

Shamil

----- Original Message ----- 
From: "Martin Reid" <mwp.reid at qub.ac.uk>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Tuesday, February 21, 2006 4:29 PM
Subject: Re: [AccessD] FYI: Good news - VBA in Office 12 and beyond...


> Gustav
>
> Here is a bit of DAO which loads a value into a new Access datatype
> called Attachment which allows you to save several attachments.
>
> Dim rsEmployees As DAO.Recordset
> Dim rsPictures As DAO.Recordset
> Set db = CurrentDb
>
> ' Get the parent recordset
> Set rsEmployees = db.OpenRecordset("Table1")
>
> 'Put the parent record into edit mode
> rsEmployees.Edit
>
>
> 'Get the attachment recordset
> Set rsPictures = rsEmployees.Fields("AttachmentCell").Value
>
> 'Set first attachment to loaded picture
> rsPictures.Edit
> rsPictures.Fields("FileData").LoadFromFile ("C:\test.jpg")
> rsPictures.Update
>
> ' Update the parent record
> rsEmployees.Update
>
>
>
> Martin
>
>




More information about the AccessD mailing list