Sub TabControlButtons_OnClick(Event As Object)
Dim Button As String
Dim FormDoc As object
Dim SectionName As String
Dim CurrState As Boolean
Button=Event.Source.Model.Label
FormDoc=Event.Source.Model.Parent.Parent.Parent
Select Case Button
Case "Tab 1": SectionName="Section2" REM section 1 is for buttons--start w/ 2
Case "Tab 2": SectionName="Section3"
Case "Tab 3": SectionName="Section4"
End Select
'GlobalScope.BasicLibraries.LoadLibrary("MRILib")
'mri FormDoc
'stop
CurrState=FormDoc.TextSections.getByName(SectionName).IsVisible
If CurrState=True Then
FormDoc.TextSections.getByName(SectionName).IsVisible=False
Else
FormDoc.TextSections.getByName(SectionName).IsVisible=True
End If
End Sub
Sub TabControlButtons_OnClick(Event As Object)
Dim Button As String
Dim FormDoc As object
Dim Buttons() As String
Dim Sections() As String
Dim NewState As Boolean
Dim I As Integer
Buttons=Array("Tab 1","Tab 2","Tab 3")
Sections=Array("Section2","Section3","Section4")
Button=Event.Source.Model.Label
FormDoc=Event.Source.Model.Parent.Parent.Parent
For I=0 to UBound(Buttons)
If Button=Buttons(I) Then
NewState=True
Else
NewState=False
End If
FormDoc.TextSections.getByName( Sections(I) ).IsVisible=NewState
Next I
End Sub
Form1 '(on top)
- Navigation controls (pushbuttons: previous, next, save, sort records) + Pushbuttons to control the tabs
Form2
- Table grid
Form3
- Table grid
- SubFormA
-- SubTable grid
Sub button_onClick(Event As Object)
REM BOUND TO COMMAND BUTTON IN FORM 1
Dim ThisForm As Object
Dim TargetForm As Object
ThisForm=Event.Source.Model.parent
TargetForm=ThisForm.Parent.getByName("Form2")
TargetForm.moveToInsertRow()
Users browsing this forum: gkick and 0 guests