Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with Checkboxes

Status
Not open for further replies.

juliejolk

Technical User
Nov 25, 2007
1
US
Hello,
I'm reviewing some existing code and need help confirming what I see. The code I'm looking at is similar to the following:
if chk_01.checked = true then
chk_01.click() 'clear the checkbox and hide text area
end if

This does not seem to be working. I substituted the code with the following:
chk_01.checked = false

At the point that this code runs, I already have the controls bound to existing data and based on a condition, I want to force the check box to an unchecked state.

Any insight on whether the .click() is appropriate and some security settings are probably to blame or if this should never have worked would be very helpful.

Thanks
Julie
 
It should. Difference of putting chk_01.checked=false instead of .click() is that the onclick handler of the control chk_01 won't execute. But everything depends on the properly set up of chk_01. If it is a collection or something else other than a _definitive_ checkbox control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top