Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Where Clause

Status
Not open for further replies.

mcbigj

Programmer
Dec 14, 2001
83
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top