-
SSTab
Hi All:
Please help!!
I have a SStabl and in here there are two tabs. I have a control array that I use to add controls at run time. My controal array adds the controls in the sstab depending on the tab index.
I.E. Controls.Add "VB.Frame", Av_sFrame, TabSetup
My user want their changes to be saved when they click to tab 2 if the current tab was 1. And if the user is on tab 2 and made some changes as the changes should be saved when the user click to tab 2.
My problem is that if the user made changes while the he/she was in tab 1 and click tab 2, the TabSetup is 2 and not 1. Thus the changes on tab 1 are saved and not 2. How can I overcome this case. I want to set the sstab(TabSetup in my case) tab to what ever the tab was when the user made changes and after saving the changes than go the next tab.
I hope I explained this properly to you guys, because I need help and I am stuck.
Thanks
ZA
:wave:
-
If I understand correctly, then I would suggest that you could
disable the changing of the tabs, only when changes are made,
unless the user saves the changes on the current tab first. Then
same logic on the other tabs.
HTH
-
ssTab
Hi RobDog888:
I will try doing that and let you know the outcome.
Thanks
-
When the user clicks on a different tab, the tab's click event tells you what the previous tab was. Use this information to decide which data to save:
Code:
Private Sub SSTab1_Click(PreviousTab As Integer)
'Save changes for tab: PreviousTab
End Sub
-
resolved:sstab
Thanks guys for all the help you have given me.
:thumb: