Hi,
The problem is next: I have a tab control with 5 pages.
On each tab page I have group of controls for 5 different periods. I tagged groups as "Period1", "Period2", "Period3" and so on.
On the bottom, after each Period, I have a delete button.
When that button is clicked I want to clear all controls for that specific period, and only on that specific page of tab control.
I have the following code for the OnClick event of delete button:
The problem is that the this clears all the data on the other tab pages as well (where the control tag is "Period1"). How can I make it to clear only the controls wher TabCtl189.Value =1 (the second page).
Tnx!
The problem is next: I have a tab control with 5 pages.
On each tab page I have group of controls for 5 different periods. I tagged groups as "Period1", "Period2", "Period3" and so on.
On the bottom, after each Period, I have a delete button.
When that button is clicked I want to clear all controls for that specific period, and only on that specific page of tab control.
I have the following code for the OnClick event of delete button:
Code:
For Each ctl In Form_frmMain.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then
If ctl.Tag = "Period1" And Form_frmMain.TabCtl189.Value="1" Then
ctl.Value = Null
End If
End If
Next ctl
Tnx!
Comment