I have a form with a tab panel, and for several of the forms in the Tab, in some circumstances, I need them to be related and in others with no relationship?
Is there a method I can use to set this in code in an onLoad event for the Form containing the Tab?
My forms are already in the tab panel and referred to by other code (index etc) so I don’t really want to re-add the form, which is what I think your example does Robert?.
Perhaps I didn’t understand your question correctly then.
You have a form with a tabpanel. But in some cases you want those tabs to show over a relationship and in other cases you don’t. Isn’t that what you want ?
Because then you have to re-add the tabs (thus remove and add) on load (or even onShow) when you want them with or without a relationship.
Thanks guys, both those methods would work I think, however, on reviewing exactly what we need as an end result, our criteria has changed a little bit.
Without a relationship TableB is shown in its entirety through record based ‘formFabric’. If we add a relationship it will become a child of TableA in a 1 to many relationship. Therefore where TableA is filtered the records shown in formFabric will also be limited, and the user will need to select a record on TableA in order to step through the child records on formFabric.
We are thinking a more elegant way to allow the user to traverse the formFabric records is without having to return to the parent table and select the next record there, but simply select next TableB record etc.
We are thinking the getSQL() may be the answer here - using it in a WHERE on loadRecords in the onShow of formFabric - where that will limit the TableB records to those related to the filters applied to TableA.
Or would it be more appropriate to use code to step through the TableB records and when there are none left select the next index in TableA and so on?
I’m not entirely sure that makes sense but its not something we’ve done before. For clarification, the data in TableB can be used ‘stand-alone’ in its own right - though some Clients want to combine the two (Parent Table A - Child TableB) and hence the need for it to be presented in this dual way.