K
Kitty
I apologize for the wordiness of my question. I'm having
trouble being concise.
I have a form that displays 16 different facets of a
portfolio. The user selects an option from a group on a
form, and depending on the selection, the form shows the
applicable records.
Most of the forms are populated from one table with
filters applied through a macro. Two of those options
open duplicates of the main form based on different tables
with the same exact table structure (the base set of
records populating the tables is different). The only
difference in the forms is the recordsource.
I'm trying to change the recordsource depending on the
selection, and have just one form.
The code I have behind one of the unique selections is:
DoCmd.SetWarnings False
DoCmd.OpenQuery "qmakSampleSelectionReportAdHoc"
Me.Form.RecordSource = "tblAdHocSampleSelectionReport"
DoCmd.OpenForm "frmSAmpleSelectionPreview"
DoCmd.SetWarnings True
The form populates with the correct data from the AdHoc
table EXCEPT the TITLE on the form does not change from
whatever option was selected previously. The title on the
form comes from a Report_Name field in the table. If, in
this case, the AdHoc option is selected first, the name on
the form is blank.
The master form is bound to a table called tblLRMCutOff.
Help!
Thanks for your suggestions.
Kitty
trouble being concise.
I have a form that displays 16 different facets of a
portfolio. The user selects an option from a group on a
form, and depending on the selection, the form shows the
applicable records.
Most of the forms are populated from one table with
filters applied through a macro. Two of those options
open duplicates of the main form based on different tables
with the same exact table structure (the base set of
records populating the tables is different). The only
difference in the forms is the recordsource.
I'm trying to change the recordsource depending on the
selection, and have just one form.
The code I have behind one of the unique selections is:
DoCmd.SetWarnings False
DoCmd.OpenQuery "qmakSampleSelectionReportAdHoc"
Me.Form.RecordSource = "tblAdHocSampleSelectionReport"
DoCmd.OpenForm "frmSAmpleSelectionPreview"
DoCmd.SetWarnings True
The form populates with the correct data from the AdHoc
table EXCEPT the TITLE on the form does not change from
whatever option was selected previously. The title on the
form comes from a Report_Name field in the table. If, in
this case, the AdHoc option is selected first, the name on
the form is blank.
The master form is bound to a table called tblLRMCutOff.
Help!
Thanks for your suggestions.
Kitty