添加附件到表单 [英] Add Attachment to form

查看:112
本文介绍了添加附件到表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为dbo_problems的链接表,以及一个名为问题记录详细信息的表单。我创建了一个名为附件的表格。 附件 table包含以下字段:ID,Problem_ID和Attachment。


ID是主键(DataType = AutoNumber)

Problem_ID是(DataType = Number)(索引是否重复)

附件是(数据类型=附件)(必需=否)


表格问题记录详细信息有一个名为Attachment的Unbound对象。我希望用户能够从此表单插入附件。我尝试了以下作为控制源:

I have a linked table called "dbo_problems", and a form called "Problem Records Details". I have created a table called "Attachments". The "Attachments" table contains the following fields: ID, Problem_ID, and Attachment.

ID is Primary Key (DataType=AutoNumber)
Problem_ID is (DataType=Number) (Indexed Yes No Duplicates)
Attachment is (DataType=Attachment) (Required = No)

The form "Problem Records Details" has an Unbound object called Attachment. I would like the user to be able to insert an attachment from this form. I have tried the following as the control source:

展开 | 选择 | Wrap | 行号

推荐答案

如果出现Problem_ID附件表是独一无二的,为什么你把它放在自己的表中?如果它将是一对一的,只需将它放在同一个表中。
If Problem_ID in the attachment table is unique, why did you put it in its own table? If it''s going to be one to one anyways, just put it in the same table.


dbo_problems表是一个链接表。所以我无法创建一个新的附件字段。


我想将所有附件保存在名为Attachments的不同本地表中。 Attachments表中的Problem_ID字段应引用dbo_problems表的ID字段。我不确定我是否解释好了。我刚才意识到你发表评论说我可能需要将ID字段数据从dbo_problems转储到Attachments表中,对吗?如果我仍然感到困惑,请告诉我。
The dbo_problems table is a linked table. So I can not create a new Attachments field.

I want to keep all attachments in a different local table called Attachments. The Problem_ID field in the Attachments table should reference the ID field of the dbo_problems table. I am not sure if I explained it ok. I just realized however now that you made the comment that I would probably need to dump the ID field data from dbo_problems into the Attachments table, right ? Let me know if I am still confusing.


没有必要从问题表中插入所有ID。您可以使用外部联接查询作为表单的源,并查看它是否可更新。如果没有,您只需创建一个单独的表单,您可以在附加文件时调用该表单。
It''s not necessary to insert all the ids from the problem table. You could use an outer join query as the source for your form and see if that''s updatable. If not, you''ll just need to create a separate form that you can call when you want to attach a file.


这篇关于添加附件到表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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