子窗体未从 Access 2010 中的其他子窗体输入更新
我有一个数据库,其中一个表单中有 2 个子表单,其字段如下
子表单 1:“预订数量”、“预订数量” 子表单 2:“总库存”
在 Access 2003 中运行时,单击“刷新”按钮时,“总库存”字段会根据输入到“预订”或“预订了'字段。这是使用以下代码完成的,并且工作正常:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
当我在 Access 2010 中打开此数据库时,“总库存”字段将不会更新。我尝试将代码修改为以下内容,但没有成功。
DoCmd.RunCommand.acCmdRefresh
我还尝试了以下代码,但也没有成功:
DoCmd.RunCommand acCmdSaveRecord
我无论如何都不是 Access 专家,但只是想知道是否有一些明显的东西我错过了?
谢谢
I have a database with 2 sub forms within a form with fields as below
Sub Form 1: 'Qty Booked In', 'Qty Booked Out'
Sub Form 2: 'Total Stock'
When running in Access 2003, the 'Total stock' field is updated when a 'Refresh' button is clicked depending on the values entered into the 'Booked in' or 'Booked out' fields. This is done using the following code and works fine:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
When I open this database in Access 2010, the 'Total Stock' field will not update. I have tried amending the code to the below, with no success.
DoCmd.RunCommand.acCmdRefresh
I have also tried the following code with no success either:
DoCmd.RunCommand acCmdSaveRecord
I'm not an Access expert by any means but was just wondering if there is something obvious that I have missed?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我自己设法解决了这个问题:
I have managed to solve this myself:
Try
DoMenuItem 早已被弃用。
Try
DoMenuItem is long since deprecated.