I have a table bound main form.It is a simple data entry form. It has 5 tabs and each tab contains a subform. There is a checkbox called chkShortRpt. I want something like this:
When user clicks on chkShortRpt, meaning it is true, I want to hide the third tab named SiteLocation and its subform.
How can I do it?
I tried to put the uppder code but what happens is:
1. When I open the form and if the first record has chkShortRpt=tru e, it won't hide the tab.
2. When I try to enter a new record, and make chkShortRpt= true, it will hide the tab temporarily. As soon as I click on any other tab it will show it again and it serves no meaning of the code than.
Please help!!
When user clicks on chkShortRpt, meaning it is true, I want to hide the third tab named SiteLocation and its subform.
How can I do it?
Code:
Private Sub chkShortRpt_Click() If Me.chkShortRpt.Value = True Then Me.tabSite.Visible = False Else Me.tabSite.Visible = True End If End Sub
1. When I open the form and if the first record has chkShortRpt=tru e, it won't hide the tab.
2. When I try to enter a new record, and make chkShortRpt= true, it will hide the tab temporarily. As soon as I click on any other tab it will show it again and it serves no meaning of the code than.
Please help!!
Comment