A
alex
When does record become dirty?
Hello,
I posted a question about the dirty property in the immediate window…I
think this question is different, so that’s why I’m posting it here.
In the On Dirty event of all my text/combo boxes I call this function
(=IsRecordDirty()):
Private Function IsRecordDirty()
Debug.Print Me.Dirty
If Me.Dirty Then
Me.cmdUndo.Enabled = True
Me.cmdSave.Enabled = True
Else
Me.cmdUndo.Enabled = False
Me.cmdSave.Enabled = False
End If
End Function
When I open the form, click on a textbox, and type data, the On Dirty
event of that control fires, but fires Me.Dirty = False.
I then click a second textbox, type data, the On Dirty event of that
control fires Me.Dirty = True.
This happens every single time…I don’t understand why the record does
not become dirty until I (1) click a control and type data, (2) click
a second control and type data (now causing the record to dirty).
Any help as to what I’m doing wrong would be appreciated!
Thanks,
alex
Hello,
I posted a question about the dirty property in the immediate window…I
think this question is different, so that’s why I’m posting it here.
In the On Dirty event of all my text/combo boxes I call this function
(=IsRecordDirty()):
Private Function IsRecordDirty()
Debug.Print Me.Dirty
If Me.Dirty Then
Me.cmdUndo.Enabled = True
Me.cmdSave.Enabled = True
Else
Me.cmdUndo.Enabled = False
Me.cmdSave.Enabled = False
End If
End Function
When I open the form, click on a textbox, and type data, the On Dirty
event of that control fires, but fires Me.Dirty = False.
I then click a second textbox, type data, the On Dirty event of that
control fires Me.Dirty = True.
This happens every single time…I don’t understand why the record does
not become dirty until I (1) click a control and type data, (2) click
a second control and type data (now causing the record to dirty).
Any help as to what I’m doing wrong would be appreciated!
Thanks,
alex