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
精彩评论