CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 [SOLVED] Broken Checkbox

Print topic Send  topic

Author Message
kevind

Posts: 251
Posted: 03/12/2012, 10:22 AM

MS Access project.

Checkbox field for Boolean data type or YESNO field

I have other fields on other forms that work without issue. This form and field just won't take an update through a checkbox. I dumped the checkbox, recreated it, created a new scratch page and form and copied and pasted in the checkbox (only field on form) from that form and it still didn't work.

I changed the type from chkbox to listbox to radiobutton - none worked. I compared the field's properties to other forms with YESNO field types and they are no different.

I finally had to settle for using a Textbox with format Y;N - this does update the database field and then retrieves the current value correctly. All other method would always show the value as True after attempting to update it to false.

Anyone have a fix for this time waster ?


_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
View profile  Send private message
tumby1974

Posts: 26
Posted: 03/14/2012, 8:32 AM

What do you have for the Checked Value and Unchecked Value in the Data tab for the checkbox?
View profile  Send private message
kevind

Posts: 251
Posted: 03/15/2012, 6:26 AM

Quote tumby1974:
What do you have for the Checked Value and Unchecked Value in the Data tab for the checkbox?

I have tried 1,0 - true,false - y,n

I normally do not need to indicate anything.

I can create a brand new page and form with that field as a checkbox and it works fine.

I'm using a custom update because the form draws fields in from multiple tables, but this too is set up the way I normally do when it actually works.

_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
View profile  Send private message
kevind

Posts: 251
Posted: 09/26/2012, 8:59 AM

finally figure it out - BUT NO FIX :(

If I take a working form with a checkbox that has fields that update ONE table, then I create a Custom Update for the form using TABLE and let CCS pull in all the control fields - that is when the error occurs.

Once the form becomes a Custom Update by Table, the checkbox stops working - so this make me think the issue is with the Update statements in the ASP code that CCS is generating.

As soon as I delete the CUSTOM Update and let it update 'naturally', it starts working again.

A side note - if the value in the database is unchecked and I set up the Custom Table Update, the form IS able to update the field to True or 'yes' -- but, it cannot update it to False or 0 in the database.

I'm going to next investigate the SQL it is building before the update and see what is different.
_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
View profile  Send private message
kevind

Posts: 251
Posted: 09/26/2012, 9:14 AM

SOLUTION !!! :-) :-) :-)

The problem was that a checkbox for a Boolean that is unchecked is treated by CCS as empty. So the setting in the Custom Update Table method that states:

If parameter is empty: needs to be set to the second option 'Use Value' and the value should match your database's (MS Access in my case) value for false, in my case 'false' is what I put in.

Problem solved after much head scratching.
_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
View profile  Send private message
tumby1974

Posts: 26
Posted: 09/26/2012, 11:01 AM

I'm glad you found the answer!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.