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!

1 main 2 subforms, 2nd subform query of first subform...

Status
Not open for further replies.

Krullms

MIS
Aug 5, 2005
21
US
Hello,

My main form shows information of a customer. I then have 2 subforms. The first subform is a continous form of the garage doors that that customer has installed. The 2nd subform is for service calls. I link the subforms with the main form by customer_ID.

The problem I am having is in the service call subform i have a combo box that shows some information from the Doors installed subform (Door size, door model, door color..). This information is correct when i first open the form. But when i click to see the next customer, the combobox still has the information from that first customer.

I have tried requerying the subform by the oncurrent event of the customer form. I also have tried requerying the combobox in other ways, but with no luck. Any Ideas?

Thankyou for the help
Mike
 
Have you tried in the combobox OnEnter event to requery?

What is the row source of the combo box?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Thanks for the reply.

The onEnter event worked great. The rowsource of the combobox is a query that selects info from the doors table. I have the datasource for the combobox = the Door_ID. Now when i go to the next customer the combobox(es) are empty. Eventhough i have selected the door previously. When you go to a diffent company the comboboxes are empty but when i click one, they all fill in with the right information. How can I get the information to be there without me having to click one?

Thankyou GingerR
Mike
 
After thinking about this, The OnEnter event technically worked but it still leaves me with the same problem of it not updating by itself.

Any other suggestions?

Thankyou
 
Little more info..

If I remove the where clause in the query for the combobox the answers are shown as you go from one customer to the next...but when you go to add a new one, the combobox shows all the doors in the database (sinse i took out the where clause..)

Thanks
Mike
 
Hi. I'm totally confused.

Please: What is the row source of the combo box? Please post the sql code here.

I need you to start over, this is too confusing.

Thanks.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
by the way, if you use names like your form and subform names, combo box names, it will be much clearer. Please see other posts and how others list their table structures, fields, query code, etc. so we can understand. When you say things like "but when i click the combo boxes" i don't know what you are talking about - i thought there was only one combo box? And what are "answers" in a combo box? Do you mean "rows" of data? Anyhow, just some ideas on how to clarify. Also a little bit on what the function(s) of these form(s) are, what steps a user is trying to take and how it's not working. Thanks.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top