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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Combo Box on subform in tab control; different

Status
Not open for further replies.

mvital

Technical User
Jul 2, 2003
128
US
Hi All,

I have tried several ways and I just can't get it to work. I have read several suggestions online and in this forum, but have not found anything like my case.

I will try to explain. I have a main form with subforms in a tab control. The main form contains building information. This information is entered in another form that captures the bldg and project info only. The bldg information on this main form comes from that table and it is not updated or selected here. It only shows what building the user will be capturing material information for. So the building name control is a text box.

I have a combo box in a subform that's datasource is a query that lists all the rooms found in another subform in another tab. I want the cbox to list only the rooms associated with the building on the main form. I think this is where I am having a problem getting it to work. Since the building name is not a cbox I cannot have a combo box filtered depending on the selection of another cbox. So how do I do this? How does one filter a cbox depending on the information on a text box? I tried putting code on the on focus of the text box and it did not work.

Can someone point me in the right direction? Can this be done? All the tabs and subforms are linked to the main form by the building name.

thanks in advance!

 
Why do you think you can't have a combo box filtered depending on the contents of a textbox ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I know they can, just can't get mine to work. Would you put your event (macro) on the ON ENTER? Since the building name control is not touched (meaning updated) it only displays what building name record you are currently on. I read over and tried the ACC2000:Base Combo Box on Parameter Query to Filter Values ( and I get a message that 'the ROOM_ID (combo box) is not a field in the current record' when I know that it is. I thought I was getting this error because of the different levels of subforms and tab controls.

Any ideas?
 
Thanks, it was helpful. I updated it and still getting the message that there is no field named....in the current record.

Thanks for all your help. I will keep trying. :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top