Sam92Legacy
Technical User
I have a subform with a combo box for topics that describe the main form's record. When a topic needs to be added to the list, the user clicks on a button to bring up an "edit list" form. In order to refresh the combo box in the topic subform I've assigned this event for the edit list form's close button:
DoCmd.Close
Forms(Main).SetFocus
Me!Form(TopicSub).Topic.Requery
Where Main is the primary form, TopicSub is the subform, and Topic is the combo box. The edit form closes, the main form regains focus, but I get an error message saying that the command refers to an object that is either closed or doesn't exist. I've tripple-checked my spelling so I assume my grammar is wrong. Any suggestions?
Thanks,
Sam
DoCmd.Close
Forms(Main).SetFocus
Me!Form(TopicSub).Topic.Requery
Where Main is the primary form, TopicSub is the subform, and Topic is the combo box. The edit form closes, the main form regains focus, but I get an error message saying that the command refers to an object that is either closed or doesn't exist. I've tripple-checked my spelling so I assume my grammar is wrong. Any suggestions?
Thanks,
Sam