Visual Basic Explorer
Visual Basic Explorer
 Navigation
 Home


 Coding
 Source Code

 FAQ Center

 VB Tips

 Downloads

 ToolBox

 Tutorials

 VB Games

 VB News

 VB Award

 VB Forums



 Affiliates
 Planet Source Code

 Rent a Coder

 DirectX4VB


 Misc
 Search

 Feedback

 Advertise

 About


Need to hire
a VB coder?

Please support our sponsor:

 Home 
 Site Map 
 Forums 
 News 
 Feedback 

 

Q. Problem clearing check box on data interface?

 
I have created an interface which is accepting data, deleting,
finding records etc. Inside the application there are 3 check
box controls. When a new record is added all fields are cleared
waiting for me to input new data except the check boxes. They are
showing the previous record information. How do I clear the check
boxes?

 
A. For Each Control in Container
If TypeOf(Control) Is CheckBox then
Control.Checked=False
End If
Next Control

 
(01-Aug-98 Theo ionikh@hol.gr)

 
A. To check or uncheck a checkbox in code is easy:

Just set its value to True to check it and to False
to uncheck it.

 
hkSomeThing.Value = True'(or False)

 
Now, if you store the value of a checkbox in a database table,
set the field`s data type to Boolean (again, True or False).
In setting up the field, make sure the default value is set to
False (unless you can think of a good reason it should be True).

If you access the table via a data control and have bound the
checkbox to the data control, I believe the checkbox will be
automatically set to the field default during an AddNew. Thus,
adding code may be unnecessary.

(01-Aug-98 Bob Walsh rlwalsh@capecod.net)


Downloads

In IE right-click and select 'Save Target As...' or in Netscape right-click and select 'Save Link As...'

 

View Plain Text View Plain Text
Download Demo Project Not Available
View Code Online Not Available





Home | About | What's New | Source Code | FAQ | Tips & Tricks | Downloads | ToolBox | Tutorials | Game Programming | VB Award | Search | VB Forums | Feedback | VBNews | Copyright & Disclaimer | Advertise | Privacy Policy |

Quick searches: Site Search | Advanced Site Search 

Copyright 2002 by Exhedra Solutions, Inc.
By using this site you agree to its terms and conditions
VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc.