Hello,
I thought I could set up the "Record Source" property of a subform from VBA. I have a main formA, and subFormB inside formA. When formA loads I want the "Record Source" of subFormB to be linked to "queryA", but once it loads if I press a button inside formA, then the "Record Source" for subFormB should point to another "queryB".
I basically set up the subFormB's Record Source property from the property sheet, and then used VBA for the OnClick event of the button that's supposed to change the Record Source proerty to queryB but this doesn't work.
Me.qActualAppointments_subform.Form.RecordSource = "qFilledoutAppointmentsCalendar"
Me.qActualAppointments_subform.Form.Refresh
Thank you everyone
I thought I could set up the "Record Source" property of a subform from VBA. I have a main formA, and subFormB inside formA. When formA loads I want the "Record Source" of subFormB to be linked to "queryA", but once it loads if I press a button inside formA, then the "Record Source" for subFormB should point to another "queryB".
I basically set up the subFormB's Record Source property from the property sheet, and then used VBA for the OnClick event of the button that's supposed to change the Record Source proerty to queryB but this doesn't work.
Me.qActualAppointments_subform.Form.RecordSource = "qFilledoutAppointmentsCalendar"
Me.qActualAppointments_subform.Form.Refresh
Thank you everyone