Fear Naught
Kevin
- Local time
- Today, 22:43
- Joined
- Mar 2, 2006
- Messages
- 229
I am building a system to show all orders and commission payable for the Sales Team in the company I work.
I want to show this as a monthly and year to date figure.
I have setup the main form that works ot my likig and have a subform that shows all orders. What I need ot do is have a tab control with each month as the tabs plus one for all orders. The subform covers all tabs and isn't specific to individual tabs (I tried that but it ran dreadfully slowly).
I have setup an OnChange event for the tab control that sets the filter of the subform to the text on Tab pages (I used a Case Select statment).
I used the following code to set the filter on the subform but I get an error.
The error is:
Run-Time error 438
Object doesn't support this property or method
Can anybody help either by:
1. Advising on the error and why I may be getting it
or
2. Advising on a better method of filtering a subform based on a Tab Page selection.
Thanks
I want to show this as a monthly and year to date figure.
I have setup the main form that works ot my likig and have a subform that shows all orders. What I need ot do is have a tab control with each month as the tabs plus one for all orders. The subform covers all tabs and isn't specific to individual tabs (I tried that but it ran dreadfully slowly).
I have setup an OnChange event for the tab control that sets the filter of the subform to the text on Tab pages (I used a Case Select statment).
I used the following code to set the filter on the subform but I get an error.
Code:
Select Case Me.TabCtl27.Value
Case 0
Forms!frmIndividualData_Months!frmRunningTotals_subform.FilterOn = False
Case 1
Forms!frmIndividualData_Months!frmRunningTotals_subform.Filter = "[real month]= 'Mar'"
Case 2
Forms!frmIndividualData_Months!frmRunningTotals_subform.Filter = "[real month]= 'Apr'"
etc etc
End Select
Forms!frmIndividualData_Months!frmRunningTotals_subform.FilterOn = True
The error is:
Run-Time error 438
Object doesn't support this property or method
Can anybody help either by:
1. Advising on the error and why I may be getting it
or
2. Advising on a better method of filtering a subform based on a Tab Page selection.
Thanks