开发者

Form.Dirty is false when it should be true

I no开发者_Python百科tice that in one of my form(bounded to a query), when I do this code:

Private Sub Form_Dirty(Cancel As Integer)
    MsgBox Me.Form.Dirty
End Sub

It should pop up the value 'true', because this is onDirty event, right? But actually i get a 'false'. Why?


That’s because the dirty event is where you can cancel the change and roll it back. It is after the dirty event that the form actually gets marked as dirty. The chain of events for a text box for example is this

KeyDown > KeyPress > BeforeInsert > Dirty > KeyUp

Hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜