Access 2007 Unbound Attachment Control [英] Access 2007 Unbound Attachment Control

查看:78
本文介绍了Access 2007 Unbound Attachment Control的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:

在Access 2007中寻找有关未绑定附件控制的Attachemnt数据类型的帮助。  在表单上,​​添加了一个未绑定的附件控件(注意,该控件必须保持未绑定状态)。 以编程方式(VBA),如何"填充"表格中存储的附件(在这种情况下为pdf)。在表格内? 

扩展问题,附件数据类型的哪些方面(存档在具有.FileData,.FileType和.FileName等属性的表中)将用于分配给附件在表格内控制? 哪个控件的属性需要设置?

这是一些简单的代码,用于描述问题 。 。 。

Dim RecSet As DAO.Recordset
Dim rstAttachment As DAO.Recordset
Set RecSet = CurrentDb.OpenRecordset(" SELECT PDFid,myAttachment FROM tPDF WHERE PDFid = 1")
设置rstAttachment = RecSet!myAttachment.Value
'帮助开始
我。控制附件。???? = rstAttachment!????
'帮助结束rstAttachment.Close
RecSet.Close关闭一半class ="h2_lin">解决方案

你好,

请参考这个链接:
如何:在DAO中使用附件 http://msdn.microsoft.com/en-us/library/bb258184.aspx

你会发现你遇到的情景中的代码样本。

如果你需要关于附属领域的一些音乐会信息,请参阅这个文件:
http://office.microsoft.com/en-us/access/HA012138521033.aspx


对于此特定于Access的问题,您还可以在Access Discussion Group中发布一个主题:

http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.access .formscod ING&安培;朗= EN&安培; CR = US

感谢

Hello:

Looking for assistance with Attachemnt Data Type with Unbound Attachment Control in Access 2007.   On a form, an Attachment control has been added, which is unbound (note, the control must remain unbound).  Programatically (VBA), how would an attachment (in this case a pdf) stored within a table, be "populated" within the form? 

Expanding on the question, what aspects of the Attachment data type (archived within a table which have properties of .FileData , .FileType, and .FileName etc) would be used in assignment to the Attachment control within form?  Which of the control's properties need setting?

Here is some simple code for trying to describe the issue . . .

Dim RecSet As DAO.Recordset
Dim rstAttachment As DAO.Recordset
Set RecSet = CurrentDb.OpenRecordset("SELECT PDFid, myAttachment FROM tPDF WHERE PDFid =1")
Set rstAttachment = RecSet!myAttachment.Value
' Help Start
Me.ControlAttachment.???? = rstAttachment!????
' Help End
rstAttachment.Close
RecSet.Close




解决方案

Hello,

please refer to this link:
How to: Work With Attachments In DAO
http://msdn.microsoft.com/en-us/library/bb258184.aspx

You'll find code samples againest the scenario you meet.

If you need some concert info on attachement field please refer to this document:
http://office.microsoft.com/en-us/access/HA012138521033.aspx


For this Access specific question, you could also post a thread in Access Discussion Group:

http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.access.formscoding&lang=en&cr=US

Thanks.


这篇关于Access 2007 Unbound Attachment Control的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆