|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Clear Form Issue!!!
Anyone know how to get a form to reload but with all the checkboxes CLEARED? I can gt option buttons and text fields to clear on reload but my checkboxes stay in the state previously entered....very strange!
Kristin |
|
#2
|
||||
|
||||
|
try something like this
Code:
Dim ctrl As Control
For each Control In Me.Controls
If TypeOf(ctrl) Is CheckBox Then
ctrl.Value = Unchecked
End If
Next
|
|
#3
|
|||
|
|||
|
Do I put this under Form_load???? And it is saying syntax error, looking for a variable? SOmething with the TypeOf(ctrl)....
|
|
#4
|
||||
|
||||
|
Place the code whereever you want to loop through the controls and reset them.
This is the code to do it. Code:
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is CheckBox Then
ctrl.Value = vbUnchecked
End If
Next
|
|
#5
|
|||
|
|||
|
worked! now do you have any idea
why my datagrids won't clear out when I exit my forms (unload them) unless I exit the application totally? Do I run the same kind of routine for those???? |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Clear Form Issue!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|