Hi,
I have two forms: "frm_main" and "frm_sub". "frm_sub" in an unbound sub form on "frm_main". I would like to set the SourceObject of "frm_sub" dynamically in VBA behind a command button on another form. The SourceObject will be one of many forms in the database.
Also on "frm_main", I would like to have 2 buttons with OnClick events that refer to the same SourceObject that is set for "frm_sub".
Hope this makes sense. Basically I want one main form with two command buttons that dynamically will be able to know the name of the source of the sub form which also is dynamically set during an OnClick event on another form (so I don't have 20 forms in the database).
Thanks
I have two forms: "frm_main" and "frm_sub". "frm_sub" in an unbound sub form on "frm_main". I would like to set the SourceObject of "frm_sub" dynamically in VBA behind a command button on another form. The SourceObject will be one of many forms in the database.
Also on "frm_main", I would like to have 2 buttons with OnClick events that refer to the same SourceObject that is set for "frm_sub".
Hope this makes sense. Basically I want one main form with two command buttons that dynamically will be able to know the name of the source of the sub form which also is dynamically set during an OnClick event on another form (so I don't have 20 forms in the database).
Thanks