更新事件后,光标从我进行更改的记录跳转到顶部... [英] After Update Event, cursor jumps from the record in which I made the change to top...

查看:61
本文介绍了更新事件后,光标从我进行更改的记录跳转到顶部...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好:


我有一个显示记录的连续表格。在其中一个字段Binding_Percentage的AfterUpdate事件中,我有以下代码:

Hello:

I have a continuous form that displays records. In the AfterUpdate event of one of the fields, Binding_Percentage, I have the following code:

展开 | 选择 | Wrap | 行号

推荐答案

嗨基思。在表单上执行的重新查询将当前记录重置回记录集的开头,这不是您需要的。您只需要重新查询受影响的字段,而这不是使用Docmd完成的。


为了将来参考,尝试在ANDed表单中使用With是不正确的,无论如何这里不需要With,因为你没有提到属于公共控件的属性列表。



Hi Keith. A requery carried out on the form resets the current record back to the beginning of the recordset, which is not what you need. You need to requery the affected fields only, and this is not done with a Docmd.

For future reference, trying to use With in an ANDed form is incorrect, and anyway a With is not needed here as you are not referring to a list of properties belonging to a common control.

Replace your code with
展开 | 选择 | Wrap | 行号



嗨Keith。在表单上执行的requery将当前记录重置为..................] .Requery

Me![Sum50NWP] .Requery


结束子

[/ code]

-Stewart
Hi Keith. A requery carried out on the form resets the current record back to the ..................].Requery
Me![Sum50NWP].Requery

End Sub
[/code]
-Stewart



斯图尔特:


感谢我的想法,我会回复你,但我需要去参加一个会议............


谢谢!


Stewart:

Thanks for the idea I am going to get back to you but I need to run off to a meeting............

Thanks!


斯图尔特:


好​​的,我将代码更改为以下内容,就像你的内容一样:

Stewart:

Okay, I changed the code to the following like you inidicated:

展开 | 选择 | Wrap | 行号

这篇关于更新事件后,光标从我进行更改的记录跳转到顶部...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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