I have a list box on a form. When I pick an item from the list box, the SourceObject Property of a subform changes to a different form. That works great. Trouble is, I don't know how to make that subform open showing specific records. When I try to specify that form in code, Access can't find it. It's like it's not really open when viewed through a subform. Does anyone have any suggestions? If I did not explain it well, let me know I'll try again. Thanks in advance.
Subforms are controls on the parent form, so they require a different approach when coding.
To address a control on a subform for example:
Forms("Name of main form")("Name of subform")("ControlName")
To requery a subform:
Forms("Name of main form")("Name of subform").Requery
Name of subform is the name of the subform viewed from the property sheet in the main form. Click on the subform so the subform is selected and bring up it's properties, you will probably find this is a different name to your form name altogether.