I have a nested tabcontrol.
tabControl 1 and tabControl3
In tabControl3 I am trying to populate a text control with a value from a control placed on tabControl1.
Expand|Select|Wrap|Line Numbers
- ' add a savings tabpage
- Dim strSavingsPage As String
- Dim dblTaxRate As Double
- dblTaxRate = Me.txtRetirementTaxRate.Text
- For Each tabpg As TabPage In SavingsAllTabPages
- If Not TabControl3.Contains(tabpg) Then
- TabControl3.TabPages.Add(tabpg)
- tabpg.Text = "Savings"
- tabpg.Focus()
- strSavingsPage = Mid(tabpg.Name, 11)
- Me.Controls("txtWithdrawRate" & strSavingsPage).Text = dblTaxRate
- Exit For
- End If
- Next
Expand|Select|Wrap|Line Numbers
- Me.Controls("txtWithdrawRate" & strSavingsPage).Text = dblTaxRate
Expand|Select|Wrap|Line Numbers
- Me.txtWithdrawRate1.Text = dblTaxRate
The complete error is:
NullReference exception was unhandled
Object reference not set to an instance of an object.
I am probably doing something obvious but vb.net is not my strong point.
Any ideas?
cheers,