by NBS Solutions Inc. (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 29th February 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
'Routine to reset your controls 'This can be handy to use after you have update a record and need to reset 'the controls for the next entry
'This can be handy to use after you have update a record and need to reset
'the controls for the next entry
Private Sub resetAll()
Dim ctrlX As Control
'reset all the control values
For Each ctrlX In Controls
If TypeOf ctrlX Is TextBox Then ctrlX.Text = ""
If TypeOf ctrlX Is CheckBox Then ctrlX.Value = 0
If TypeOf ctrlX Is OptionButton Then ctrlX.Value = False
Next ctrlX
End Sub
'Note
'You can asign any vb internal contol to the var and then manipulate the
'proprties as needed
'The class name of all Visual Basic internal controls.
'Remarks
'You can dimension a variable as a Control object and reference it as you would a control on a form.
'The following demonstrates this:
'Dim C as Control
'Set C = Command1
No comments have been posted about 'Routine to reset your controls 'This can be handy to use after you have update a record and need t. Why not be the first to post a comment about 'Routine to reset your controls 'This can be handy to use after you have update a record and need t.