MarcMellor
Programmer
I am trying to put different selections of information from the same database into different MSHFlexGrids on different Tabs of an SSTab control. I initially assumed that clicking, say, Tab 3 would fire an event for which I could write code for my ADODC control to make a particular selection from the connected database. But I cannot find any reference to any particular chosen Tab so I have resorted to a new ADODC control on every one of the 12 Tabs I need. My gut feeling is that this is not good practice!!!I've seen in a book that there is a PreviousTab Keyword, so there may be a CurrentTab Keyword but I can't really think how I can write code so that the program 'knows' that the current Tab is Tab 3 so that I can specify exactly what selection the ADODC control should make from the database.
Thinking on my feet - would this get somewhere:
Private Sub SSTab1_Click(CurrentTab As Integer)
Select Case CurrentTab
Case 0
ADODC1.RecordSource = "SELECT(*) FROM .. WHERE ..etc
Case1
ADODC1.RecordSource = "SELECT(*) FROM .. WHERE ..etc
Any Thoughts??
Thinking on my feet - would this get somewhere:
Private Sub SSTab1_Click(CurrentTab As Integer)
Select Case CurrentTab
Case 0
ADODC1.RecordSource = "SELECT(*) FROM .. WHERE ..etc
Case1
ADODC1.RecordSource = "SELECT(*) FROM .. WHERE ..etc
Any Thoughts??