从文本框值向表中添加记录 [英] adding records to table from text box values

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

问题描述

我设置了两个表(一个是常规索赔

信息,另一个是ClaimNumber,PartNumber和QuantityReplaced)。

ClaimNumber是一个自动编号,是两个表中的主键。我在两张桌子之间建立了一对一的关系。我有一个零件表格。

它包括25个文本框,包括零件编号和数量,所以50

总计。我将每个零件号文本框的控制源设置为来自PartsReplaced表的
PartNumber。我将数量文本框的每个

的控制源设置为PartsReplaced表中的QuantityReplaced。


输入部件号并按Tab键输入数量,每个部分

数字页面上的文本框改变以匹配第一个。换句话说,如果我

输入1234,在第一个框中,所有其他24个文本框更改为读取1234。

数量相同的事情发生。


我应该建立关系一对多?不太确定该怎么办

这个...


我需要能够存储多达25个零件及其各自的数量

我将拥有的每项保修索赔。我会运行报告,告诉我哪些部件已被输入最多,以及每个部件的更换次数为

各自的索赔。


请帮助...感谢您的时间,


山南

-

留言通过 http://www.accessmonster.com

I set up two tables (one with the regular claim
info and another with ClaimNumber, PartNumber, and QuantityReplaced). The
ClaimNumber is an autonumber and the primary key in both tables. I made a
one to one relationship between the two tables. I have a form for the parts.
It includes 25 text boxes for both the part numbers and the quantities, so 50
total. I set the control sources for each of the part number text boxes to
PartNumber from the PartsReplaced table. I set the control sources for each
of the quantity text boxes to QuantityReplaced from the PartsReplaced table.

When I enter a part number and press tab to enter the quantity, every part
number text box on the page changes to match the first. In other words, if I
enter "1234" in the first box all other 24 text boxes change to read "1234".
The same thing happens for the quantities.

Should I make the relationship one - to - many? Not really sure how to do
this...

I need to be able store up to 25 parts with their respective quantities for
each warranty claim I will have. I will have run reports to tell me which
parts have been entered the most, as well as what parts were replaced for
each respective claim.

Please help...Thanks for your time,

Shannan
--
Message posted via http://www.accessmonster.com

推荐答案

我怀疑不是这样做的方法。我建议: -


索赔表: - TblClaim - ClaimID,ClaimReference Date,Claimant

etc

One表列出所有部分: - TblParts - PartID,PartNumber,

PartDescription。

一个表将它们链接在一起: - JoinClaimPart - ClaimID,PartID,

QtyReplaced。

将ClaimID和PartID设置为联合密钥,不允许重复。这个

将停止为任何索赔输入两次零件。


然后你有一个索赔的主表格,并在其上有零件的子表格

替换并更换数量。使用组合框选择

替换的部分。您也可以将默认数量设置为1.您还需要

将LinkMasterRecord和LinkSlaveRecord设置为PartID


使用基于零件和JoinClaimPart表格你可以获得
来获取统计数据。


它还允许你根据需要使用多个或几个部分< br $>
索赔


HTH


Phil

" Shannan Casteel via AccessMonster.com" ; < FO *** @ AccessMonster.com>写在

消息新闻:53 *********** @ AccessMonster.com ...
Not the way to do it I suspect. I would suggest:-

One table for the Claim:- TblClaim - ClaimID, ClaimReference Date, Claimant
etc
One table to list all the parts:- TblParts - PartID, PartNumber,
PartDescription.
One table to link them together:- JoinClaimPart - ClaimID, PartID,
QtyReplaced.
Set the ClaimID and PartID as joint keys with no duplicates allowed. This
will stop a part being entered twice for any claim.

You then have a Main form for the Claim and on it a subform for the Parts
Replaced and quantity replaced. Use a combo box to select the parts
replaced. You might as well set the default quantity to 1. You also need to
set the LinkMasterRecord and LinkSlaveRecord to PartID

Using a query based on the Parts and JoinClaimPart tables you will be able
to get the statistics.

It will also allow you to use as many or as few parts as you want for each
claim

HTH

Phil
"Shannan Casteel via AccessMonster.com" <fo***@AccessMonster.com> wrote in
message news:53***********@AccessMonster.com...
我设置了两个表(一个与常规表索赔
信息和另一个与ClaimNumber,PartNumber和QuantityReplaced)。
ClaimNumber是一个自动编号,是两个表中的主键。我在两张桌子之间建立了一对一的关系。我有一个
部分的表格。
它包括25个文本框,包括部件号和数量,所以总共有50个。我从PartsReplaced表中为每个零件号文本框
设置了控件来源
PartNumber。我将每个
数量文本框的控制源设置为QuantityReplaced from PartsReplaced
表。

当我输入部件号并按Tab键进入时数量,页面上的每个部分
数字文本框都会改变以匹配第一个。换句话说,如果我输入1234,那么
在第一个方框中,所有其他24个文本框改为阅读
1234。
数量相同的事情发生。

我应该建立一对一的关系吗?许多?不太确定怎么做
这个...

我需要能够存储多达25个零件及各自的数量

每个保修索赔我会有。我会运行报告告诉我哪些部件已被输入最多,以及哪些部件被替换为各自的索赔。

请帮助...谢谢为你的时间,

山南

-
通过 http://www.accessmonster.com
I set up two tables (one with the regular claim
info and another with ClaimNumber, PartNumber, and QuantityReplaced). The
ClaimNumber is an autonumber and the primary key in both tables. I made a
one to one relationship between the two tables. I have a form for the
parts.
It includes 25 text boxes for both the part numbers and the quantities, so
50
total. I set the control sources for each of the part number text boxes
to
PartNumber from the PartsReplaced table. I set the control sources for
each
of the quantity text boxes to QuantityReplaced from the PartsReplaced
table.

When I enter a part number and press tab to enter the quantity, every part
number text box on the page changes to match the first. In other words,
if I
enter "1234" in the first box all other 24 text boxes change to read
"1234".
The same thing happens for the quantities.

Should I make the relationship one - to - many? Not really sure how to do
this...

I need to be able store up to 25 parts with their respective quantities
for
each warranty claim I will have. I will have run reports to tell me which
parts have been entered the most, as well as what parts were replaced for
each respective claim.

Please help...Thanks for your time,

Shannan
--
Message posted via http://www.accessmonster.com



Phil,


感谢您的回复。


使用组合框选择零件到底是什么意思?我有
大约100,000件可供选择。我认为组合框不会是可行的。另外你如何更改所有LinkMasterRecord和

LinkSlaveRecord的东西?


谢谢,

山南

Phil Stanton写道:
Phil,

Thank you for your reply.

What exactly did you mean by using a combo box to select the parts? I have
about 100,000 parts to choose from. I don''t think a combo box would be
feasable. Also how do you change all the LinkMasterRecord and
LinkSlaveRecord stuff?

Thanks,
Shannan

Phil Stanton wrote:
我怀疑不是这样做的方式。我建议: -

索赔表: - TblClaim - ClaimID,ClaimReference Date,Claimant
等一个表列出所有部分: - TblParts - PartID, PartNumber,
PartDescription。
一个表将它们链接在一起: - JoinClaimPart - ClaimID,PartID,
QtyReplaced。
将ClaimID和PartID设置为联合键,不允许重复。这将
将停止两次输入任何索赔的部分。

然后您有一个索赔的主表格,并在其上有部件的子表格替换和数量替换。使用组合框选择已更换的部件。您也可以将默认数量设置为1.您还需要将LinkMasterRecord和LinkSlaveRecord设置为PartID

使用基于Parts和JoinClaimPart表的查询,您将能够
它还允许您根据需要使用尽可能多的部分

HTH
Phil
Not the way to do it I suspect. I would suggest:-

One table for the Claim:- TblClaim - ClaimID, ClaimReference Date, Claimant
etc
One table to list all the parts:- TblParts - PartID, PartNumber,
PartDescription.
One table to link them together:- JoinClaimPart - ClaimID, PartID,
QtyReplaced.
Set the ClaimID and PartID as joint keys with no duplicates allowed. This
will stop a part being entered twice for any claim.

You then have a Main form for the Claim and on it a subform for the Parts
Replaced and quantity replaced. Use a combo box to select the parts
replaced. You might as well set the default quantity to 1. You also need to
set the LinkMasterRecord and LinkSlaveRecord to PartID

Using a query based on the Parts and JoinClaimPart tables you will be able
to get the statistics.

It will also allow you to use as many or as few parts as you want for each
claim

HTH

Phil
我设置了两个表(一个包含常规索引
信息,另一个包含ClaimNumber,PartNumber和QuantityReplaced)。
I set up two tables (one with the regular claim
info and another with ClaimNumber, PartNumber, and QuantityReplaced). The


[引用文字剪辑 - 29行]


[quoted text clipped - 29 lines]


山南



-

通过 http://www.accessmonster.com 发布的消息


--
Message posted via http://www.accessmonster.com


另外,你可能是对的。,但我不是子表单的忠实粉丝。我会

而是让用户按下按钮将它们带到另一个表格中,然后他们可以输入零件号然后返回主表格。


山南


Shannan Casteel写道:
Also, your probably right., but I''m not a big fan of subforms. I would
rather have the user press a button taking them to another form where they
can enter the part numbers then go back to the main form.

Shannan

Shannan Casteel wrote:
Phil,

感谢您的回复。 />
使用组合框选择零件到底是什么意思?我有大约100,000个零件可供选择。我认为组合框不可行。另外你如何更改所有LinkMasterRecord和
LinkSlaveRecord的东西?

谢谢,
山南
Phil,

Thank you for your reply.

What exactly did you mean by using a combo box to select the parts? I have
about 100,000 parts to choose from. I don''t think a combo box would be
feasable. Also how do you change all the LinkMasterRecord and
LinkSlaveRecord stuff?

Thanks,
Shannan
不是这样做的方法我疑似。我建议: -
Not the way to do it I suspect. I would suggest:-


[引用文字剪辑 - 27行]


[quoted text clipped - 27 lines]


山南



-

通过 http://www.accessmonster.com


这篇关于从文本框值向表中添加记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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