This is reference to Vandana Sridhar's refreshing the form
The code displayed below did work.
But I have three frames inside the form
Each of the frames consist of 15 text boxes. If I click Add button then the frame1 is visible, By clicking Modify btn frame2 is visible and so on.
Inside each frame I have two btns cmdsave and cmdcancel.
What I want is by clicking on cmdcancel I want the textboxes of that particular frame only cleared.
eg. By clicking on cmdcancel I want textboxes of frame1 to be cleared
not the other two frames
Where should I modify
I tried
For Each Ctrl In Frame1
But it resulted in an error
Help appreciated
Thanks
The code displayed below did work.
Code:
Dim Ctrl As Control For Each Ctrl In Me.Controls If TypeOf Ctrl Is TextBox Then Ctrl.Text = "" Next
Each of the frames consist of 15 text boxes. If I click Add button then the frame1 is visible, By clicking Modify btn frame2 is visible and so on.
Inside each frame I have two btns cmdsave and cmdcancel.
What I want is by clicking on cmdcancel I want the textboxes of that particular frame only cleared.
eg. By clicking on cmdcancel I want textboxes of frame1 to be cleared
not the other two frames
Where should I modify
I tried
For Each Ctrl In Frame1
But it resulted in an error
Help appreciated
Thanks
Comment