Hello,
I have a main form add_customers that has a subform Equipment_Subform1. One of the fields in the subform is a combo box that gets its data from another table. I have a button to open a form to add entries to the table that the combo box gets its data from. After I add entries I want to close the form and have the combo box update. I have this code in the onclose event of the form:
Forms!Add_Equipment1!Combo6.Requery. Combo6 is the box on my subform. When I try this it says that Access can't find the subform-Runtime error 2450. If I open the subform by itself under my main form and try the code again, then it works fine. It's as if Access can't see the subform.
What do I need to change to make this work? I've been looking around this site and trying different code that I've seen but none of it works.
Thanks for your help,
Spencer
I have a main form add_customers that has a subform Equipment_Subform1. One of the fields in the subform is a combo box that gets its data from another table. I have a button to open a form to add entries to the table that the combo box gets its data from. After I add entries I want to close the form and have the combo box update. I have this code in the onclose event of the form:
Forms!Add_Equipment1!Combo6.Requery. Combo6 is the box on my subform. When I try this it says that Access can't find the subform-Runtime error 2450. If I open the subform by itself under my main form and try the code again, then it works fine. It's as if Access can't see the subform.
What do I need to change to make this work? I've been looking around this site and trying different code that I've seen but none of it works.
Thanks for your help,
Spencer