Hi.
I have a sub form which, 90% of the time, I want to come from QryA. In one case, however, I want it to come from QryB. I have used the following code:
DoCmd.OpenForm "FrmAttach"
Forms("FrmAttach").RecordSource = "QryAttachFilter"
This works well, opening the form, and then removing certain records (The query is acting like a filter)
However, when i then open the main form, where this form is a sub form the new record source is not brought through.
Is there a way to change the record source of a subform in a similar way?
Thank you
I have a sub form which, 90% of the time, I want to come from QryA. In one case, however, I want it to come from QryB. I have used the following code:
DoCmd.OpenForm "FrmAttach"
Forms("FrmAttach").RecordSource = "QryAttachFilter"
This works well, opening the form, and then removing certain records (The query is acting like a filter)
However, when i then open the main form, where this form is a sub form the new record source is not brought through.
Is there a way to change the record source of a subform in a similar way?
Thank you