Re: how to set the check box's checked/unchecked value to different value?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: fredg (fgutkind_at_example.invalid)
Date: 06/05/04


Date: Sat, 05 Jun 2004 00:05:38 GMT

On Fri, 4 Jun 2004 16:31:02 -0700, Flora wrote:

> Hi,
>
> Does anyone know how to set the Check box or option button's value?
> In Access database, the default checked value(yes) is -1, and the
> default unchecked vaulue(no) is 0. I wanna change the checked value
> to 1, and unchecked value to -1. How to do that?
>
> Thanks!

Is the Check Box used as stand-alone control, or is it used within an
Option Group as a selection control?

1) As a stand-alone True/false control?
Why would you want to. Why does it matter? You can't!

A Check Box is either True, Yes, or On (-1) or False, No, or Off (0).

If working with the -1 value is creating a problem, let us know what
the problem is and perhaps we can help with that.

2) Used as a control within an Option Group (instead of the usual
radio buttons)?
Set the Check control's Option Value to what ever you want.
The Option Group will get it's value from the selected control's value
within the group, i.e. 1, 2, 3, etc.

-- 
Fred Please only reply to this newsgroup. I do not reply to personal
email.

Quantcast