使用每个记录一个表单编辑多个表 [英] Edit multiple tables with one form per record

查看:65
本文介绍了使用每个记录一个表单编辑多个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的不确定如何在Access中解决这个问题。我创造了什么

是每个位置的表格。这些表的格式相同但

信息不同。


表格以商店编号和
$等关键点命名b $ b商店ID。这些表格的字段是通用字段,例如每天销售额b / b $ b b,银行存款等等。每个商店的第一个字段

表是日期,我已将其设置为一个商店的主键

每天不能有多个销售数据。


我遇到的问题是我似乎无法创建一个表格

,它将有一个名为DATE的数据输入框,我在其中输入

日期。

沿着这些方向,我似乎无法拥有大约30个表格,因此严格按照所选择的记录出现

日期。

这样我可以输入相应于2005年9月26日所有

30个商店的信息(或者有多个商店表)。


我试着开始简单并创建一个表格,让我编辑

多个表格,但是当我从一个表格复制到
$ b时$ b另一种形式,似乎将所有输入框恢复到第一张

表。我很困惑如何继续并在MS中完成此表格

访问。

I''m really not sure how to go about this in Access. What I''ve created
is a table for each location. Those tables are identical in format but
different in information.

The tables are named after key points such as the store number and the
store ID. The fields of those tables are generic fields such as sales
per day, bank deposit and what not. The first field for each store
table is the date and I''ve set that as the primary key as one store
cannot have more than one sales data per day.

The problem I have encountered is that I cannot seem to create a form
that will have a data entry box called DATE in which I enter in the
date.
Along those lines, I cannot seem to have some thirty tables or so have
strictly the records come up which correspond to that selected date.
That way I can enter in information corresponding to 9/26/2005 for all
thirty stores (or however many store tables there are).

I tried to start simple and create a form that will let me edit
multiple tables, but when I copy over the boxes from one form to
another form, it seems to revert all the entry boxes to the first
table. I am confused on how to proceed and complete this form in MS
Access.

推荐答案

Ricky,这不是你创建关系数据库的方式。


你需要一个Store表,每个商店都有一条记录。字段:

StoreID自动编号或商店的唯一代码。主要钥匙

StoreName这家商店的全名。

郊区商店在哪里。


然后你需要一张Sale表包含所有商店的销售信息。它将
将包含字段:

SaleID自动编号(主键)

StoreID与Store.StoreID相关(存储此条目)

SaleDate日期/时间此条目的日期。

金额货币此商店在此日期的销售额。


您现在可以创建一个绑定到Sale表的表单。它将有一个组合框

用于选择商店。


如果您愿意,您可以创建一个绑定到Store表的主表单,其中包含

子表单绑定到Sale表。子表单将显示该商品的销售额(每个日期一行。)


BTW,不要调用字段日期:那个'系统日期的保留字。


HTH。


-

Allen Browne - 微软MVP 。西澳大利亚州珀斯。

访问用户提示 - http:// allenbrowne.com/tips.html

回复群组,而不是mvps dot org的allenbrowne。


< ri **** *******@gmail.com>在消息中写道

news:11 ********************** @ g14g2000cwa.googlegr oups.com ...
Ricky, this is not how you create a relational database.

You need a Store table, with one record for each store. Fields:
StoreID AutoNumber or unique code for the store. Primary key
StoreName Full name of this store.
Suburb Where the store is.

Then you need a Sale table that contains the sales info for all stores. It
will have fields:
SaleID AutoNumber (primary key)
StoreID Relates to Store.StoreID (which store this entry is)
SaleDate Date/Time The date for this entry.
Amount Currency The amount of sales for this store on this date.

You can now create a form bound to the Sale table. It will have a combo box
for selecting the store.

If you prefer, you could create a main form bound to the Store table, with a
subform bound to the Sale table. The subform would show the sales for that
store (one row for each date.)

BTW, don''t call a field Date: that''s a reserved word for the system date.

HTH.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<ri***********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
我真的不确定如何在Access中进行此操作。我创造了什么
是每个位置的表格。这些表的格式相同但信息不同。

表格以商店编号和商店ID等关键点命名。这些表的字段是通用字段,例如每天的销售额,银行存款和不存在的字段。每个商店的第一个字段
表是日期,我已将其设置为一个商店的主键
每天不能有多个销售数据。

我遇到的问题是我似乎无法创建一个表格
将有一个名为DATE的数据输入框,我在其中输入
日期。
沿着这些方向,我似乎无法大约有三十张左右的表格
严格记录了与所选日期相对应的记录。
这样我就可以输入相应于2005年9月26日所有三十家商店的信息(或者有很多商店表)。

我试着开始简单并创建一个表单,让我编辑多个表格,但当我从一个表格复制到表格时
另一种形式,它似乎将所有的入口盒还原到第一张表。我很困惑如何继续并在MS
Access中完成此表单。
I''m really not sure how to go about this in Access. What I''ve created
is a table for each location. Those tables are identical in format but
different in information.

The tables are named after key points such as the store number and the
store ID. The fields of those tables are generic fields such as sales
per day, bank deposit and what not. The first field for each store
table is the date and I''ve set that as the primary key as one store
cannot have more than one sales data per day.

The problem I have encountered is that I cannot seem to create a form
that will have a data entry box called DATE in which I enter in the
date.
Along those lines, I cannot seem to have some thirty tables or so have
strictly the records come up which correspond to that selected date.
That way I can enter in information corresponding to 9/26/2005 for all
thirty stores (or however many store tables there are).

I tried to start simple and create a form that will let me edit
multiple tables, but when I copy over the boxes from one form to
another form, it seems to revert all the entry boxes to the first
table. I am confused on how to proceed and complete this form in MS
Access.



也许我打破了太多的信息。 />
如果我将所有商店表合并到一个表中,那么我已经走了

围绕无法使用表单编辑多个表的问题

因为我会将我的销售信息放在一张桌子上。


但这仍然让我回到原来的问题我无法想象

out how解决。

在表单中,它显示表中的所有条目。我只想添加一张

的新纪录。


也许是这样的......


---日期---

商店ID ^ 1 | SALES ^ 1 |存款^ 1

存储ID ^ 2 |销售^ 2 |存款^ 2

存储ID ^ 3 |销售^ 3 |存款^ 3

存储ID ^ 4 |销售^ 4 |存款^ 4

当我输入数据时,无论我在DATE提交的内容是9/25/2005,

所有提交的记录都将在Field1。


我是否以错误的方式看待整个方面?

Perhaps I was breaking down the information too much.
If I combine all the store tables into one table, then I have gone
around the issue of not being able to edit multiple tables with a form
because I''ll have my sales information in one table.

But that still brings me back to an original problem I could not figure
out how to solve.
In the form, it displays all entries in the table. I just want to add a
new record.

Perhaps something like this..

--- DATE ---
STORE ID^1 | SALES^1 | DEPOSIT^1
STORE ID^2 | SALES^2 | DEPOSIT^2
STORE ID^3 | SALES^3 | DEPOSIT^3
STORE ID^4 | SALES^4 | DEPOSIT^4

When I input data, then whatever I submit with DATE being 9/25/2005,
all the records submitted will have that date in Field1.

Am I looking at the entire aspect the wrong way?


Allen,感谢您的回复。

我有一个商店餐桌,我称之为商店主信息

我有以下字段。

商店编号|商店地址|存储电话号码|等等。


我理解你对Sale表所说的内容,但是我不知道如何创建一个绑定到Sale表的表单。

我不需要一次显示超过一个日期的销售额。我只需

需要能够在一个

屏幕/表格中输入所有商店的信息,以便于输入信息。

再一次,谢谢你的帮助,我很感激,现在我知道

每个商店解决方案去一张桌子是不正确的。我将有一个

商店表,其中包含所有商店及其相应的

信息,然后是销售表,其中包含所有销售额

信息。


我将尝试在我的Access书中搜索有关边界的内容。

Allen, thanks for your reply.
I do have a Store table, I have called it the Store Master Information
where I have the following fields.
Store Number | Store Address | Store Phone Number| etc,.

I understand what you said with the Sale table, however I do not
understand how I can create a form bound to the Sale table.
I don''t need to show sales for more than one date at a time. I just
need to be able to enter the information for all the stores in one
screen/form to make it easy to enter information.

Once again, thank you for your help, I appreciate it and now I know
that going to a table per store solution was incorrect. I will have a
Store table which has all the stores and their corresponding
information, and then a Sales table which will have all the sales
information.

I will try to search in my Access book about bounding.


这篇关于使用每个记录一个表单编辑多个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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