This topic is locked

Checkbox Values

2/26/2006 17:00:59
ASPRunnerPro General questions
lefty author

Is there any way to change the value of the checkbox value "on" to an integer. For example I have multiple checkboxes in my project. I need to change the value of "on" to "1" and "null"(unchecked) to 0 so the database field for the checkbox will show 1 or 0 instead of "on" or "null"

Sergey Kornilov admin 2/26/2006

Just make sure this field in the database is Yes/No for MS Access or TYNIINT/BIT for SQL Server. I won't recommend to use text fields for chckbox purposes.

lefty author 2/27/2006

Just make sure this field in the database is Yes/No for MS Access or TYNIINT/BIT for SQL Server. I won't recommend to use text fields for chckbox purposes.


This field is a numeric value . My filed on the list page shows up as "on" . I am trying to to make "on" the numeric value of "1" and "null" numeric value of "0". Is this possible . I am using MS Access?

Sergey Kornilov admin 2/27/2006

John,
In ASPRunnerPro 4.0 you can use "View as" type Checkbox. That's what you looking for.

lefty author 2/28/2006

John,

In ASPRunnerPro 4.0 you can use "View as" type Checkbox. That's what you looking for.


I already have those fields set to checkbox in asprunner pro project . When adding a new record and the field is checked ; the result to the database is "on" . Is there any way to make that result in the database a numeric value like "1" so I can run a query against it. I need to count the records that are set to "on".

Sergey Kornilov admin 3/1/2006

Hi,
it seems that your field type is text, not numeric. please open your database, go to Design mode and change the type of your field to numeric.