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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get/set the value of a check box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am using a form that has a check box on it. The check box field is from a linked table. I would like to be able to check to see what state the check box is in, and act upon that information.<br><br>I tried something like this:<br><br>Dim StrResult As String<br><br>If DBU.VALUE Then<br>&nbsp;StrResult = MsgBox(&quot;Database is being update&quot;, vbCritical, &quot;Database Update in Progress&quot;)<br>End If<br><br><br>But I keep getting a run time error '2427' (You entered an expression that has no value) <p>John Vogel<br><a href=mailto:johnvogel@computerwiz.net>johnvogel@computerwiz.net</a><br><a href= Home Page</a><br>Jesus is the Way, the Truth, and the Life:<br>
Without the Way there is no going;<br>
Without the Truth there is no knowing;<br>
Without the Life there is no living. —Anon.
 
the value of the check box can be null, 0 , -1 if the box is check it will be -1 to get this you simply put in the name of the checkbox for instance<br><br>msgbox &quot;the value of checkbox2 = &quot; & checkbox2<br><br> <p>Walt III<br><a href=mailto:SAElukewl@netscape.net>SAElukewl@netscape.net</a><br><a href=
 
If the name of your checkbox is <b>chkIsRight</b>, <br><br>then in code you can simply do this:<br><br>If Me.chkIsRight Then<br>&nbsp;&nbsp;' Do something ...<br>Else<br>&nbsp;&nbsp;' Do something else ... <br>End if <p>Jim Lunde<br><a href=mailto:compugeeks@hotmail.com>compugeeks@hotmail.com</a><br><a href= Application Development
 
I tried the above suggestions (both) and still receive the error that the expression has no value <p>John Vogel<br><a href=mailto:johnvogel@computerwiz.net>johnvogel@computerwiz.net</a><br><a href= Home Page</a><br>Jesus is the Way, the Truth, and the Life:<br>
Without the Way there is no going;<br>
Without the Truth there is no knowing;<br>
Without the Life there is no living. —Anon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top