[英]MS ACCESS Update Table using Subform
I am creating a form to update my database. 我正在创建一个表单来更新我的数据库。 I would like the user to select two options to filter the results: Month and State Then I would like to populate a subform (in datasheet view) where the user can update the other corresponding columns (amount due, etc) Then I would like a button that uses the imputed data and updates the main database.
我希望用户选择两个选项来过滤结果:月和州然后我想填充一个子表单(在数据表视图中),用户可以在其中更新其他对应的列(应付金额等),然后我想要一个使用估算数据并更新主数据库的按钮。
I created a query to filter the results based on the 2 combo boxes. 我创建了一个查询,以基于2个组合框过滤结果。 When it is populated onto the subform it will not allow editing.
当它填充到子窗体上时,将不允许编辑。
How do I begin to solve this problem? 我如何开始解决这个问题?
*I've tried creating a temporary table using the query results, but I cannot get the temp table to populate into the subform so that I can just write an update query to move the results from the temp table to the main database. *我尝试使用查询结果创建一个临时表,但无法将临时表填充到子表单中,因此我只能编写一个更新查询以将结果从临时表移至主数据库。
Thank you so much! 非常感谢!
Your query is probably not an updateable query so it disallows editing. 您的查询可能不是可更新的查询,因此它不允许编辑。
To use an updateable query or temp table in your subform, you need to use VBA to handle the dynamic process: 若要在子窗体中使用可更新的查询或临时表,您需要使用VBA来处理动态过程:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.