I want to have a disabled Tab control with a subform in it grab only certain records (dependent on the main form [case_id]) from a query I have when the tabcontrol is enabled. Problem is, that the main form is dynamic and the case_id isn't generated by the main form but another subform as the process unfolds.
I have no problem if instead of using the tab control, I use a Docmd.OpenForm "name",,, "case_id=..." because then the subform opens and query's the info with the where condition.
I think what is happening with the tab control is that the subform is part of the tab control which in turn is part of the main form so when the main form initially loads, the subform loads behind the scenes "without" the where clause because a case_id has not been generated.
At the beginning I have the tab control invisible and the subform on the tab control disabled, hoping this would stop the subform from grabbing the recordset until I called it. This doesn't seem to work.
Any Ideas??
Sorry for the long Post.
I have no problem if instead of using the tab control, I use a Docmd.OpenForm "name",,, "case_id=..." because then the subform opens and query's the info with the where condition.
I think what is happening with the tab control is that the subform is part of the tab control which in turn is part of the main form so when the main form initially loads, the subform loads behind the scenes "without" the where clause because a case_id has not been generated.
At the beginning I have the tab control invisible and the subform on the tab control disabled, hoping this would stop the subform from grabbing the recordset until I called it. This doesn't seem to work.
Any Ideas??
Sorry for the long Post.