Hi,
I'm having difficulty getting the following to work
I've tried different variations but just cannot work out the syntax.
Basically I have a form with a tab control, when the tab changes I want to dynamicaly change the source of the subform on the specific page.
Here is the full onchange function
Can anyone help me get the syntax right please.
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts
I'm having difficulty getting the following to work
Code:
Eval("[forms]![contacts].[Page" & Current_Tab & "_Tab].SourceObject") = aTab(Me.TabCtl0)
I've tried different variations but just cannot work out the syntax.
Basically I have a form with a tab control, when the tab changes I want to dynamicaly change the source of the subform on the specific page.
Here is the full onchange function
Code:
Private Sub TabCtl0_Change()
Dim aTab As Variant
ReDim aTab(10)
aTab(9) = "dbo_Business_Register subform"
If (Current_Tab > 2) Then
Eval ("[forms]![contacts].[Page" & Current_Tab & "_Tab].SourceObject = null")
End If
If (Me.TabCtl0 > 2) Then
Current_Tab = Me.TabCtl0
Eval("[forms]![contacts].[Page" & Current_Tab & "_Tab].SourceObject") = aTab(Me.TabCtl0)
End If
End Sub
Can anyone help me get the syntax right please.
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts