下一条记录/上一条记录 - 发生了什么事件? [英] Next Record / Previous Record - what event occurs?

查看:102
本文介绍了下一条记录/上一条记录 - 发生了什么事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候。我有一个带有子表单的Mainform。 Mainform具有单个

记录格式,子表单具有连续的表单格式。当Mainform

打开时,我强制allowadditions和allowedits为FALSE(对于

Mainform和Subform)。没问题。


但是,当我点击子窗体的导航控件将

移动到子窗体中的下一条记录时,AllowAdditions和AllowEdits

更改为TRUE。不好。


我在

子表单模块的Form_KeyDown()和Form_KeyPress()中设置断点来跟踪问题,但是没有断点受到了打击。


问题:当点击导航控制下一条记录或

以前的记录时会发生什么事?


非常感谢。


问候,

SueB


***通过Developersdex发送 http://www.developersdex.com ***

解决方案

Susan Bricker写道:

问候。我有一个带有子表单的Mainform。 Mainform具有单一的记录格式,子表单具有连续的格式。当
Mainform打开时,我强制allowadditions和allowits为FALSE(对于Mainform和Subform都是如此)。没问题。

然而,当我点击子窗体的导航控件移动到子窗体中的下一条记录时,AllowAdditions和AllowEdits
变为TRUE。不好。

我在
子窗体的模块中的Form_KeyDown()和Form_KeyPress()中设置断点,以跟踪问题,但两个断点都没有被击中。<问题:点击导航控制下一条记录或
上一条记录会发生什么事?




表单的当前事件,它不会改变你的AllowAdditions和

AllowEdits设置,除非它包含明确的代码。


-

我请勿查看此邮件附带的电子邮件帐户

。发送给... ...

在Hunter dot com的RBrandt


Rick,


谢谢你信息。我确实击中了子窗体的CurrentEvent。然而,

不知何故这些属性正在发生变化。我已经跟踪了大约10次

现在并且在Form_Current

例程结束后(在Subform中)似乎没有任何地方。我试过设置一个观察当物业的价值发生变化时,可以看到

,但我可能没有设置

正确观察因为我没有得到任何点击,要么。


哇,这太难了。


我很乐意将我的mdb文件(压缩)发送给任何有兴趣的人

帮助。只需发送一个电子邮件地址再次感谢您尝试

来帮助。


问候,

SueB


***通过开发人员指南 http://www.developersdex.com 发送** *


Susan Bricker写道:

感谢您的信息。我确实击中了子窗体的CurrentEvent。然而,不知何故,这些属性正在发生变化。我已经跟踪了大约10次
现在看起来并没有在Form_Current
例程结束后(在Subform中)去任何地方。我试过设置一个观察如果属性值发生变化,请参阅
,但我可能没有正确设置
因为我也没有得到任何点击。



尝试在代码中的每一行设置断点,以便更改

allowadditions和allowedits属性。这就像

一样简单,点击该行开头的左边距。你可以

,然后把光标放在任何变量上,在任何程序中,没有
超出范围看它的价值。


Greetings. I have a Mainform with a subform. The Mainform has single
record format and subform has continuous form format. When the Mainform
opens, I force allowadditions and allowedits to FALSE (for both the
Mainform and Subform). No problem there.

However, when I click on the navigation control of the subform to move
to the next record in the subform, the AllowAdditions and AllowEdits
changes to TRUE. Not good.

I set breakpoints at Form_KeyDown( ) and Form_KeyPress( ) in the
subform''s module, to trace the problem, but neither breakpoint got hit.

QUESTION: What event occurs when the Navigation Control Next record or
Previous record are clicked?

Thanks much.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***

解决方案

Susan Bricker wrote:

Greetings. I have a Mainform with a subform. The Mainform has single
record format and subform has continuous form format. When the
Mainform opens, I force allowadditions and allowedits to FALSE (for
both the Mainform and Subform). No problem there.

However, when I click on the navigation control of the subform to move
to the next record in the subform, the AllowAdditions and AllowEdits
changes to TRUE. Not good.

I set breakpoints at Form_KeyDown( ) and Form_KeyPress( ) in the
subform''s module, to trace the problem, but neither breakpoint got
hit.

QUESTION: What event occurs when the Navigation Control Next record or
Previous record are clicked?



Current event of the form, and it would not change your AllowAdditions and
AllowEdits settings unless it contained code to explicitly do so.

--
I don''t check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Rick,

Thanks for the info. I did hit CurrentEvent of the subform. However,
somehow those properties are changing. I have traced it around 10 times
now and it doesn''t seem to go anywhere after the end of the Form_Current
routine (in the Subform). I have tried setting a "Watch" entry to see
when the value of the property changes, but I may not be setting the
Watch up properly because I don''t get any hits on that, either.

Wow, this is a toughy.

I''d gladly send my mdb file (zipped) to anyone who would be interested
in helping. Just send an email address. Thank you, again, for trying
to help.

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***


Susan Bricker wrote:

Thanks for the info. I did hit CurrentEvent of the subform. However,
somehow those properties are changing. I have traced it around 10 times
now and it doesn''t seem to go anywhere after the end of the Form_Current
routine (in the Subform). I have tried setting a "Watch" entry to see
when the value of the property changes, but I may not be setting the
Watch up properly because I don''t get any hits on that, either.



Try setting break points at each line in your code that changes
the allowadditions and allowedits properties. That''s as simple as
clicking in the left hand margin at the start of the line. You can
then put your cursor over any variable, in any procedure, that hasn''t
gone out of scope to see it''s value.


这篇关于下一条记录/上一条记录 - 发生了什么事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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