bradmaunsell
Programmer
I am having a problem setting the record source for a subform based on an event on the main form.
Main form is "frmAppData" and it has a tab control with 12 tabs. 11 of the tabs have subforms.
I have a button on each subform for setting the record source - this works OK.
I want to eliminate this button on the subform.
I am using an On Change event for the tab control to set the subform record source when the tab is clicked. This is NOT working for setting record source. However, this event works for other "stuff".
For example,
TabControl uses On Change having a SELECT CASE routine
Case "pagNotes"
Forms!frmAppData.frmApp_Notes.SetFocus
Forms!frmAppData.frmApp_Notes.RecordSource = "tblRating_WIP"
Forms!frmAppData.frmApp_Notes.Requery
This TabControl Select Case event fails when running code Forms!frmAppData.frmApp_Notes.RecordSource = "tblRating_WIP"
The error message is "438 Object doesn't support this property or method"
My button on the subform runs OK with
Me.SetFocus
Me.RecordSource = "tblRating_WIP"
Me.Requery
Any help you can offer will be appreciated
Brad
Main form is "frmAppData" and it has a tab control with 12 tabs. 11 of the tabs have subforms.
I have a button on each subform for setting the record source - this works OK.
I want to eliminate this button on the subform.
I am using an On Change event for the tab control to set the subform record source when the tab is clicked. This is NOT working for setting record source. However, this event works for other "stuff".
For example,
TabControl uses On Change having a SELECT CASE routine
Case "pagNotes"
Forms!frmAppData.frmApp_Notes.SetFocus
Forms!frmAppData.frmApp_Notes.RecordSource = "tblRating_WIP"
Forms!frmAppData.frmApp_Notes.Requery
This TabControl Select Case event fails when running code Forms!frmAppData.frmApp_Notes.RecordSource = "tblRating_WIP"
The error message is "438 Object doesn't support this property or method"
My button on the subform runs OK with
Me.SetFocus
Me.RecordSource = "tblRating_WIP"
Me.Requery
Any help you can offer will be appreciated
Brad