[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 556
  • Last Modified:

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.
0
chobe
Asked:
chobe
  • 3
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
The Form On Dirty applies here ...

mx
0
 
TextReportCommented:
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
Private Sub TabCtl28_Change()
    If Me.Dirty Then
       Me.Dirty = False
    End If
End Sub

Open in new window

0
 
chobeAuthor Commented:
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?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
The tab control and it's pages do not have a Dirty event because it (they) is not an editable control - like a text and combo box are.

Some controls like the Microsoft Treeview control do not show all of the actual properties / events on the standard property sheet for the control.  You can only see them on code.

mx
0
 
chobeAuthor Commented:
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!
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now