自动从另一个表输入数据。 [英] Auto Enter Data from another table.

查看:61
本文介绍了自动从另一个表输入数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是新来的,来自FMP5.0。我正在使用表#1。在这张表中,我有两个字段(其中包括)。字段1是卡名称。字段二是卡号。在表#2中是卡名称列表及其相应的卡号。我需要的是当我的用户选择卡名称时从表#1中的列表(通过查询该字段填充的列表),然后是卡号。应填写表2中的匹配编号。


有可能吗?清楚如泥?


感谢您的帮助和耐心。

Hello everyone,

I am new to access, coming over from FMP5.0. I am working with a table#1. In this table I have two fields (among others). Field one is "Card Name" field two is "Card Number". In table#2 is the list of Card names with their corresponding card numbers. What I need is when my user selects the "Card Name" from list in Table#1 (the list populated via query for the field), then "Card Number" should be populated with the matching number from table 2.

Is it possible? Clear as mud?

Thank you for the help and patience.

推荐答案

" Clear as mud"我认为是对的。你所说的是你有两个,两者都有卡名。和卡号领域。如果是的话,你违反了关系数据库的第一条规则!您将相同的数据存储在两个表中。其中一个字段(无论哪一个是唯一的)应该出现在每个表中,作为一个主键和第二个字段中的外键,而第二个字段应出现在表中,并显示Foreighn键。

"Clear as mud" is correct, I think. What you''ve said is that you have two tables, both of which have "Card Name" and "Card Number" fields. If true, you''ve violated the first rule of relational databases! You''re storing the same data in two tables. One of the fields (whichever one is unique) should appear in each table, as a Primary Key in one and as a Foreign Key in the second, while the second field should appear in the table with the Foreighn Key appears.


大家好,



有可能吗?清除泥浆?


感谢您的帮助和耐心。
Hello everyone,

I am new to access, coming over from FMP5.0. I am working with a table#1. In this table I have two fields (among others). Field one is "Card Name" field two is "Card Number". In table#2 is the list of Card names with their corresponding card numbers. What I need is when my user selects the "Card Name" from list in Table#1 (the list populated via query for the field), then "Card Number" should be populated with the matching number from table 2.

Is it possible? Clear as mud?

Thank you for the help and patience.


我将不得不研究外键因为我对这个术语并不熟悉。


仅供参考,表一是保存卡片名称及其编号的表格。我保持分开,因为根据我们的需要随机添加或减少这些名称和数字。第二个表用于存储特定用户以及他在工作中所做的事情。他必须输入的部分信息是他使用的是哪张卡。我只想由proggie而不是用户输入卡号。让我看看我是否可以说明:


表1

Field1 = CardName

Field2 = CardNumber

表2

Field1 = WorkOrder

Field2 = EmployeeNumber

Field3 =(这是员工/用户必须选择哪张卡的地方他从表1中的查询提供的列表中工作。

Field4 =(这是我希望从Field2Table1自动输入Field3选项的卡号的地方)

Field5 = JobType

Field6 = Mhrs

Field7 =结果通过/失败选择

Field8 =评论如果失败

Field9 =创建了自动输入日期/时间记录。


更清楚?我还在设计错了吗?我将不得不加倍ck,但CardNumbers可能是一个独特的领域,我可以将其设置为关键,但不确定。我确定卡片名称不是唯一的。
I''ll have to research "foreign key" as I am not familiar with the term.

FYI, table one is table where I keep the card names and their numbers. I keep that separatly because those names and numbers get added or substracted at random based on our needs. The second table is used to store a particular user and what he did on the job. Part of the information he has to enter is which card he used. I would just like for the card number to be entered also by the proggie rather than the user. Let me see if I can illustrate:

Table1
Field1=CardName
Field2=CardNumber

Table2
Field1=WorkOrder
Field2=EmployeeNumber
Field3=(This is where employee/user has to choose which card he worked from list provided by query from table 1)
Field4=(this is where I would like the card number matching Field3 selection to be autoentered from Field2Table1)
Field5=JobType
Field6=Mhrs
Field7=Results Pass/Fail choice
Field8=Comments If Fail
Field9=AutoEnter Date/Time record created.

Any clearer? Am I still designing it wrong? I will have to double ck, but CardNumbers may be a unique field and I can set that as key, however, not sure. I am sure Card Names are not unique.


PK - 主键

特定于某一特定数据的那部分数据记录。

FK - 外键

匹配(或部分匹配)另一个表的PK的数据。
PK - Primary Key
That part of the data which is unique for a particular record.

FK - Foreign Key
Data which matches (or part matches) the PK of another table.


这篇关于自动从另一个表输入数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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