[英]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:选项:
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 中包含徽标附件字段表,如果没有连接子句,徽标记录将与数据表/查询(笛卡尔关系)的每个记录相关联,仅在标题部分放置绑定控件 - 不适用于数据输入/编辑表单,因为结果查询不可更新
save the logo image externally and store path in text field then use DLookup expression or Cartesian query在外部保存徽标图像并将路径存储在文本字段中,然后使用 DLookup 表达式或笛卡尔查询
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.