DAO Recordset嵌套循环 [英] DAO Recordset Nested Loops

查看:75
本文介绍了DAO Recordset嵌套循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能会朝错误的方向走,所以请随时在这里提出其他建议。

概述:我需要看一下常见的字段两个表并找到它们相等的位置。如果相等,我需要更新另一个带有值的表,当不相等时,我需要用不同的值更新该表。

详细信息:第一个表是tblKidCharges和第二个表是tblTeach。两个表都包含字段FamilyID。当孩子和他的父母(教师)都在场时,他们的家人当天应该收到0.00美元的费用。但是,如果孩子在场并且父母不在场,家庭将收到15美元的费用。

工作到目前为止:我认为这将完成2个记录集。我已经尝试过在记录集中骑自行车以找到它们相等的位置,但是我不能让它们更新表格(tblCharges)。


任何想法都会非常感激!

I''m probably going off in the wrong direction, so feel free to offer other suggestions here.

Overview: I need to look at a common field in two tables and find where they are equal. When equal, I need to UPDATE another table with a value, and when not equal, I need to UPDATE that table with a different value.

Details: The first table is tblKidCharges and the second table is tblTeach. Both tables contain the field FamilyID. When both a child and his parent (the Teacher) are present, their family should receive a $0.00 charge that day. However, if the child is present and the parent is not present, the family will receive a $15.00 charge.

Work Thus Far: I figure this will be done with 2 recordsets. I have experimented with cycling through the recordsets to find where they are equal, but I can''t get them to then UPDATE the table (tblCharges).

Any thoughts would be greatly appreciated!

推荐答案

0.00当天收费。但是,如果孩子在场并且父母不在场,家庭将收到
0.00 charge that day. However, if the child is present and the parent is not present, the family will receive a


15.00的费用。

远远的工作:我认为这将使用2个记录集完成。我已经尝试过在记录集中骑自行车以找到它们相等的位置,但是我不能让它们更新表格(tblCharges)。


任何想法都会非常感激!
15.00 charge.

Work Thus Far: I figure this will be done with 2 recordsets. I have experimented with cycling through the recordsets to find where they are equal, but I can''t get them to then UPDATE the table (tblCharges).

Any thoughts would be greatly appreciated!



我可能会朝错误的方向走,所以请随时提供其他建议。

概述:我需要查看两个表中的公共字段并找到它们相等的位置。如果相等,我需要更新另一个带有值的表,当不相等时,我需要用不同的值更新该表。

详细信息:第一个表是tblKidCharges和第二个表是tblTeach。两个表都包含字段FamilyID。如果孩子和他的父母(教师)都在场,他们的家人应该收到
I''m probably going off in the wrong direction, so feel free to offer other suggestions here.

Overview: I need to look at a common field in two tables and find where they are equal. When equal, I need to UPDATE another table with a value, and when not equal, I need to UPDATE that table with a different value.

Details: The first table is tblKidCharges and the second table is tblTeach. Both tables contain the field FamilyID. When both a child and his parent (the Teacher) are present, their family should receive a


这篇关于DAO Recordset嵌套循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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