简体   繁体   English

如何在 Access 表单和报表标题中使用表格中的附件图像?

[英]How to use Attachment Image from Table in Access Form and Report Headers?

I have an Access database used by many projects and each project have its logo and information stored in table called company_info_tb .我有一个被许多项目使用的 Access 数据库,每个项目的徽标和信息都存储在名为company_info_tb表中。

I stored the logo in Attachment field type;我将徽标存储在附件字段类型中; each project can modify its info and logo to be used in its printed reports.每个项目都可以修改其信息和徽标以在其打印报告中使用。

How I can call the project logo to be shown in the headers of Access forms and reports using a Bound Object Frame or another way?如何使用绑定对象框架或其他方式调用要显示在 Access 表单和报告标题中的项目徽标?

I tried using dlookup in the Control Source of the Bound Object Frame:我尝试在绑定对象框架的控制源中使用dlookup

Dlookup("LOGO","company_info_tb")

And using LOGO that was shown in mainform, by putting this code in the Control Source:并使用主窗体中显示的LOGO ,将此代码放入控件源中:

=forms!main_frm!LOGO

But it doesnt work.但它不起作用。

Options:选项:

  1. include logo attachment field table in report RecordSource, without a join clause the logo record will associate with each record of data table/query (Cartesian relationship), place bound control only in header section - not appropriate for data entry/edit form because the resulting query is not updatable在报告 RecordSource 中包含徽标附件字段表,如果没有连接子句,徽标记录将与数据表/查询(笛卡尔关系)的每个记录相关联,仅在标题部分放置绑定控件 - 不适用于数据输入/编辑表单,因为结果查询不可更新

  2. save the logo image externally and store path in text field then use DLookup expression or Cartesian query在外部保存徽标图像并将路径存储在文本字段中,然后使用 DLookup 表达式或笛卡尔查询

  3. subform/subreport in header标题中的子表单/子报表

Recommend using Image control and set its ControlSource property either by binding to attachment field or text field or expression to construct external path.推荐使用 Image 控件并通过绑定到附件字段或文本字段或表达式来构造外部路径来设置其 ControlSource 属性。 A BoundObjectFrame control must be bound to an OLEObject field and options 1 or 3 would work. BoundObjectFrame 控件必须绑定到 OLEObject 字段,选项 1 或 3 将起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在表单上显示 MS Access 表附件或存储在 SharePoint 位置的图像? - How do I display an MS Access Table Attachment or an image stored in a SharePoint location on a form? 如何从访问表中打开附件 - How to open Attachment from Access Table 从表单生成报告时,如何获取“访问报告”文本框来连接表中的记录? - How to get Access Report textbox to concatenate records from a table when the report is generated from a form? 从表单而不是表中提取访问报告查询 - Access Report Query pulling from Form instead of table 访问报告:确定从中调用报告的形式 - Access report: Determining the form the report was called from 需要从本地系统动态插入附件到访问表单并将地址保存到表中 - need to dynamically insert attachment to an access form from a local system and save the address into a table 如何在MS Access表单中发送电子邮件附件 - How to send attachment with email in an ms access form MS Access - 从具有 2 个使用相同报告但结果不同的按钮的表单运行报告 - MS Access - run report from a form that has 2 buttons that use the same report but have different results 访问VBA:附件图像不会以表格形式加载 - Access VBA: Attachment image won't load in form 在生成报告时使用Access表单? - Use an Access form while a report is being generated?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM