在过滤的表单上添加匹配记录 [英] Add Matching Record on Filtered Form

查看:65
本文介绍了在过滤的表单上添加匹配记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很少使用表单来管理我的数据,所以我希望这比我发现它更容易(我讨厌OP时说:D)


我有一个简单的表(下面列出了必须运行的各种工作的客户列表。 PK是前两个字段([Job]& [CustNo])的组合,我通常希望在不同的会话中维护各种(逻辑上分开的)列表(我可能使用相同的表单设计但只显示一个一次工作。

例如,在处理''ElecInv''工作时,我将过滤只显示[Job] =''ElecInv''的记录。

表单设计只是一个连续表单上的[txtCustNo]控件(链接到[CustNo]字段)。

表名= tblJobCust

I rarely use forms to manage my data so I expect this is easier than I found it (I hate it when OPs say that :D)

I have a simple table (laid out below) with lists of customers for various jobs that have to be run. The PK is a combination of the first two fields ([Job] & [CustNo]) and I will typically want to maintain the various (logically separate) lists in different sessions (I may well use the same form design but only show one job at a time).
For instance, when working on the ''ElecInv'' job, I will filter to show only those records with [Job]=''ElecInv''.
The form design is simply a [txtCustNo] control (linked to the [CustNo] field) on a continuous form.

Table Name=tblJobCust

展开 | 选择 | Wrap | 立数字

推荐答案

Hey NeoPa,


只是为了澄清,你试图插入新的记录到多对多表?两个密钥必须存在于相应的One表中。此外,您不能只将一个键插入多对多表中,您需要同时执行这两个操作。如果我对多对多关系错了,请纠正我。


如果我理解正确,你希望能够按工作过滤表格。过滤后,如果用户选择添加新条目,您希望它自动与作业相关联,表单将被过滤。


我认为最简单的解决方案是为[Job]添加一个新控件。但你似乎想要避免这种情况。


您是否考虑过更改设计?或者,如何创建基于tblJob的表单,该表单具有基于tblJobCust的连续子表单,该表单将列出所有客户条目。允许用户通过子表单将客户添加到作业。表单的每个页面基本上都按作业进行过滤。
Hey NeoPa,

Just to clarify, you''re trying to insert new records into the Many to Many table? Both keys must exist in the corresponding One tables. Also you can''t insert just one key into a Many to Many table you need to do both. Correct me if I''m wrong about the Many to Many relationship.

If I''m understanding this correctly you want to be able to filter the form by job. After filtering if the user chooses to add a new entry you want it to automatically be associated with the job the form is filtered by.

I think the simplest solution would be to add a new control for [Job]. But you seem to want to avoid that.

Have you considered changing your design? Alternatively what about creating a form based on tblJob that has a continuous subform based on tblJobCust that would list all customer entries. Allow the user to add customers to the job through the subform. Each page of the form would essentially be filtered by job.



Hey NeoPa,

只是为了澄清,你是否试图在多对多表中插入新记录?两个密钥必须存在于相应的One表中。此外,您不能只将一个键插入多对多表中,您需要同时执行这两个操作。如果我对多对多关系错了,请纠正我。


如果我理解正确,你希望能够按工作过滤表格。过滤后,如果用户选择添加新条目,您希望它自动与作业相关联,表单将被过滤。


我认为最简单的解决方案是为[Job]添加一个新控件。但你似乎想要避免这种情况。


您是否考虑过更改设计?或者,如何创建基于tblJob的表单,该表单具有基于tblJobCust的连续子表单,该表单将列出所有客户条目。允许用户通过子表单将客户添加到作业。表单的每个页面基本上都按作业进行过滤。
Hey NeoPa,

Just to clarify, you''re trying to insert new records into the Many to Many table? Both keys must exist in the corresponding One tables. Also you can''t insert just one key into a Many to Many table you need to do both. Correct me if I''m wrong about the Many to Many relationship.

If I''m understanding this correctly you want to be able to filter the form by job. After filtering if the user chooses to add a new entry you want it to automatically be associated with the job the form is filtered by.

I think the simplest solution would be to add a new control for [Job]. But you seem to want to avoid that.

Have you considered changing your design? Alternatively what about creating a form based on tblJob that has a continuous subform based on tblJobCust that would list all customer entries. Allow the user to add customers to the job through the subform. Each page of the form would essentially be filtered by job.



JK,

感谢您的回复。我将尝试逐段回复。

JK,
Thanks for your response. I''ll try to reply on a paragraph by paragraph basis.

  1. 该表虽然不是定义为多对多,但会支持该结构是的,这就是我在说的。我很欣赏为什么错误消息是正在发生的 - 这是我追求的解决方案。
  2. 正好在按钮上。
  3. 我确实想避免这种情况。不是因为它是一个糟糕的解决方案,而是因为如果我保持一些这样的形式,额外的控制是一个额外的项目,可能会出错(如果没有妥善维护)。有许多类似逻辑的原因,为什么我更愿意在没有它的情况下这样做,尤其是如果系统不适合他们应该代表的逻辑结构那么他们自然更难以使用(他们引入了更多必须特别记住的项目)。

    话虽如此,如果我找不到更优雅的解决方案,我会使用这种方法。
  4. 我没有提出这个想法,主要是出于我上一段中指出的相同原因而稍纵即逝。

我很欣赏这种情况有解决办法,但我是寻找:

I appreciate there are work-arounds for this situation, but I''m looking for :

  1. 最贴心的解决方案。
  2. 学习(特定问题)的基本概念,这样我才会如果我将来遇到类似的问题,我会有所需的理解和经验。

请不要以为我没有理解你的努力。这远非事实。我只是觉得你应该清楚地解释为什么他们不是我想要的。

再次感谢你。

Please don''t think I fail to appreciate your efforts. That is far from the truth. I just thought you deserved a clear explanation of why they''re not quite what I''m after.
Thank you again.



我很少使用表单来管理我的数据,所以我希望这比我发现它更容易(我讨厌OP时说:D)


我有一个简单的表(如下所示),包含必须运行的各种作业的客户列表。 PK是前两个字段([Job]& [CustNo])的组合,我通常希望在不同的会话中维护各种(逻辑上分开的)列表(我可能使用相同的表单设计但只显示一个一次工作。

例如,在处理''ElecInv''工作时,我将过滤只显示[Job] =''ElecInv''的记录。

表单设计只是一个连续表单上的[txtCustNo]控件(链接到[CustNo]字段)。

表名= tblJobCust
展开 | 选择 | Wrap | 立数字


这篇关于在过滤的表单上添加匹配记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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