abenitez77
IS-IT--Management
I have a subform on a main form that I want to change the recordsource. I have some code that loops and does this for several subforms on the main form. I need it to by dynamically, so I want to use variables.
Below is how I would do it hard coded.
Forms!MyMainForm.[MySubForm].Form.RecordSource = "SubQryTab02"
I tried this for dynamically:
Forms(MyMainForm).(MySubForm).Form.RecordSource = MySubQuery
What is the correct syntax?
Below is how I would do it hard coded.
Forms!MyMainForm.[MySubForm].Form.RecordSource = "SubQryTab02"
I tried this for dynamically:
Forms(MyMainForm).(MySubForm).Form.RecordSource = MySubQuery
What is the correct syntax?