chobe
asked on
Trap On Dirty event on Tabbed Control
Is there any way to trap any change to a tabbed control page without having to code for each field/control on the page? There is no "On Dirty" event for a tabbed control or a Page within the tabbed control.
As DatabaseMX has stated the forms On Dirty Event applies when you move from page to page in the tab control as it states in the Access help file "The Dirty event occurs when the contents of a form or the text portion of a combo box changes. It also occurs when you move from one page to another page in a tab control."
Not sure what you are doing in the OnDirty but if you are wanting to save as you go through the tabs then you can use the OnChange Event of the Tab Control and check the Dirty Property.
Cheers, Andrew
Not sure what you are doing in the OnDirty but if you are wanting to save as you go through the tabs then you can use the OnChange Event of the Tab Control and check the Dirty Property.
Cheers, Andrew
Private Sub TabCtl28_Change()
If Me.Dirty Then
Me.Dirty = False
End If
End Sub
ASKER
Sorry for the long absence....but as far as I can determine, there is is no On Change or On Dirty event for each individual page and the On Change (no On Dirty) event for the tab control only triggers when you change tabs - not change a field on a individual tab or page. I have seen where coders haved trapped events in there coding even though there is no such event in the properties list. Is that a correct assumption?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks DatabaseMX; The proplem was really a problem with how I was trapping dirty events on the main form. Once I fixed that issue, On Dirty applies to changes to the tab control as well. Thanks for your assist!
"Thanks DatabaseMX; The proplem was really a problem with how I was trapping dirty events on the main form. Once I fixed that issue, On Dirty applies to changes to the tab control as well. Thanks for your assist!"
You are welcome.
mx
You are welcome.
mx
mx