如何创建包含2个表中的数据并将数据保存到一张表的表单
我有 2 个表:
Employee:
ID
SalaryPerDay
Name (unique)
.....
.....
Schedule:
ID
EmployeeID
Date
Attending (boolean)
loan
discount
overTimeHours
查询
EmployeeNameQuery: that return all employees names
我创建一个数据表的
column 1: employees names (EmployeeNameQuery)
column 2: Date (Schedule)
column 3: Attening (Schedule)
column 1: OverTimeHours (Schedule)
column 4: Loan (Schedule)
column 5: Discount (Schedule)
包含此数据表,将行显示为员工姓名计数
问题:
1- 十进制数字显示为 (280) 我如何将它们显示为 (280.00) i可以插入小数,但我显示的值带有 .00 而没有 .00
2-如何创建包含 2 个表中的数据并将数据保存到一个表的表单,
当我填写所有数据表时,我想将这些信息提交到明细表将每个字段与表中的相关字段一起插入,并插入所选员工姓名的 EmployeeID。
i have 2 tables:
Employee:
ID
SalaryPerDay
Name (unique)
.....
.....
Schedule:
ID
EmployeeID
Date
Attending (boolean)
loan
discount
overTimeHours
and a query
EmployeeNameQuery: that return all employees names
i create a datasheet contains
column 1: employees names (EmployeeNameQuery)
column 2: Date (Schedule)
column 3: Attening (Schedule)
column 1: OverTimeHours (Schedule)
column 4: Loan (Schedule)
column 5: Discount (Schedule)
this data sheet display rows as employees names count
Questions:
1- Decimal number display as (280) how can i display them as (280.00) i can insert decimal number but i display values with .00 without .00
2- How to create form that contain data from 2 tables and save data to one table,
when i fill all datasheet with attending i want to submit these information to Schedule Table with each field with related one in the table and insert EmployeeID of selected employeeName.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于一和二,您似乎尚未将表单绑定到表或查询。仅当所有数据输入控件都绑定到字段时,数据表和连续表单才能正常工作。几乎总是最好使用连续形式而不是数据表。如果您不熟悉表单设计,那么几乎总是最好使用向导,因为它们将设置所有绑定到位的表单。
对于货币,选择货币数据类型,而不是小数 - 这对于显示来说很重要。此外,字段具有可以在表设计中设置的格式属性。
如果您打算继续在 Access 中工作,我建议您阅读一些内容。您可以在 Stackoverflow 上找到书籍列表 - The Access Cookbook 通常推荐 Getz、Litwin 和 Baron。
In regard to both one and two, it seems that you have not bound your form to a table or query. Datasheets and continuous forms only work properly if all the data-entry controls are bound to fields. It is nearly always best to use a continuous form rather than a datasheet. If you are not familiar with form design, it is nearly always best to use the wizards, because they will set up the form with all the bindings in place.
For currency, choose the currency data type, not decimal - this is important for more than display. In addition, fields have a format property that can be set in table design.
I suggest you do some reading if you intend to continue to work in Access. You will find lists of books here on Stackoverflow - The Access Cookbook Getz, Litwin and Baron is often recommended.