Working with Attachment data type in Microsoft Access 2007
page 5 of 6
by Jayaram Krishnaswamy
Feedback
Average Rating: 
Views (Total / Last 10 Days): 39999/ 624

Programmatic access to attachments

The new control called Attachment, shown in the design view of the report in Figure 28, is a new object. You can drag and drop this control on to a design like any other control.

Figure 28

Once on the form you can use the control programmatically as shown in Figure 29. You may refer to the Attachment object as shown here where Attachment0 is an instantiation of the Attachment object. You can write code to its properties, methods and the events.

Figure 29


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 4 and 1 and type the answer here:

User Comments

Title: Dr.   
Name: Jayaram Krishnaswamy
Date: 7/30/2009 8:13:28 AM
Comment:
Presently I do not have this product on my computer, but I will try to get back to you in a couple of days. In the mean time the best bet is to search Microsoft Office site.
Title: Dr.   
Name: Khalid Amer
Date: 7/30/2009 7:46:28 AM
Comment:
I also forgot to include my email.
khalid.amer@btinternet.com
Title: Dr.   
Name: Khalid Amer
Date: 7/30/2009 7:44:48 AM
Comment:
How can you programmatically copy one attachment from one table to another?
Title: IDIOT   
Name: ARTHUR hill
Date: 7/23/2009 2:50:41 PM
Comment:
arthurleehill@gmail.com

I forgot to include my email with last question.
Title: CPA   
Name: Arthur Hill
Date: 7/23/2009 2:49:42 PM
Comment:
Do I understand correctly that the only way to access the properties of an Attachment type field in a table record is to use a Attachment control? I want to programatically add attachments to records by iterating thru the recordset and adding an attachment, the file name of which is based on the ID field of the current record. I do not want the records displayed on the form.

Thanks for your assistance.

Arthur Hill, CPA, MBA, MCSD, MCDBA
Title: Working with Attachment data type in Microsoft Access 2007   
Name: Jayaram Krishnaswamy
Date: 7/15/2009 12:27:03 PM
Comment:
Mike,

Thanks for the kind comments. Looks like it was not all that comprehensive! It's sometime ago I wrote this and I don't have Office 2007 on my PC. It may be possible to set up a hyperlink to get the actual resume. Next time I will take a look at this.

Regards
Title: Working with Attachment data type in Microsoft Access 2007   
Name: Mike Kovatch
Date: 7/15/2009 12:12:28 PM
Comment:
Jay,
Very good and comprehensive article. Have you figured out a way to output the entire attachment as part of the report (not just the icon representing the attachment)?
As an example, let's say the report was an interview sheet that had 10 questions with blank areas to takes note depending on their response. The report would in include a copy of the applicant's actual resume. Is this possible?
- Mike

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/8/2009 3:16:01 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search