How do I test to see if a checkbox has been checked at run time?
Printable View
How do I test to see if a checkbox has been checked at run time?
if checkbox_name.value = 0 then '...checkbox is not checked
if checkbox_name.value = 1 then '...checkbox is checked
You can also do:
if checkbox_name.value = VBChecked
if checkbox_name.value = VBUnchecked
While that's the preferred way, you can also doQuote:
Originally Posted by isnoend07
Code:if checkbox_name.value = Checked
if checkbox_name.value = Unchecked
One other option to know about:
vbGrayed = disables the checkbox
What will access 2003 accept as valid values for a yes/no field when using a SQL INSERT statement over an ADO Connection to send information to the table?
I'm not a database guy, but i think it would be true or false. Database person will probably give an answerQuote:
Originally Posted by vbguy2008
It definitely supports the keywords True and False, eg: "...WHERE MyField = True"
It may also support the numeric values 1 and 0, and the strings Yes and No.