如何通过Access 2003中的表单更新记录 [英] How to update record through form in Access 2003

查看:136
本文介绍了如何通过Access 2003中的表单更新记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2张桌子.
一桌就是顾客.
它具有3个字段. acc_number,名称,sum
第二张表是交易
它具有transaction_id,transaction_amount,acc_number

并且我具有包含所有字段的表格.
在表单上添加新交易时,如何更新customer.sum字段.
例如

acc_number名称总和
1001 Sven 1000


我完成一笔交易,金额为500
我想将字段总和更新为1500

感谢您的回答

I have 2 tables.
one table is customers.
it has 3 fields. acc_number , name , sum
second table is transactions
it has transaction_id, transaction_amount, acc_number

and i have form which have all fields included.
How can i update customers.sum field when i add new transaction on form.
for example

acc_number name sum
1001 Sven 1000


i do one transaction with amount of 500
i want to update field sum to 1500

Thank you for answer

推荐答案

Hie!

也许这些可以帮助您...


在该行之后的交易记录中保存记录时,可以做一件事,您可以将一个变量作为整数,并且必须从客户表中按帐号字段获取SUM的最后一条记录,然后在该新行中添加最后一笔交易金额+最后一笔金额多变的.并通过帐号更新客户表中总和字段的查询.


如果您仍不满意,请给我发送您的代码,我会给您编码,好吧.....
Hie!

May be these one help you...


Do one thing when you save the record in transaction table after that line you can take one variable as integer and you have to fetch last record of SUM by account number field from customer Table and now add last transaction amount + last sum amount in that new variable. and update query for sum field in customer table by account number.


If you still not nderstand send me your code i will give to answer with coding Okay.....


这篇关于如何通过Access 2003中的表单更新记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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