473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Check Box Default

Talk about a basic question, but this is making me nuts.
I have a form with several check boxes ... they are all set to default
to "unchecked." The db also defaults to unchecked. But, as soon as we
hit the "form1.recordset.addnew" all of the cb's change themselves to
"checked." ???
Thanks in advance
Jack

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 5696
Are you talking about a HTML form?

If so, what is the *value* of the checkbox, since that's what you're saving
to the database.

Cheers
Ken

"Jack Buick" <ja*******@earthlink.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
: Talk about a basic question, but this is making me nuts.
: I have a form with several check boxes ... they are all set to default
: to "unchecked." The db also defaults to unchecked. But, as soon as we
: hit the "form1.recordset.addnew" all of the cb's change themselves to
: "checked." ???
: Thanks in advance
: Jack
:
: *** Sent via Developersdex http://www.developersdex.com ***
: Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #2
Just to clarify what I mean here:

In HTML, a checkbox is "checked" when the checked attribute is added, eg:

<input type="checkbox" name="chkMyCheckBox" value=1" checked>

However, when the form is posted, only the *value* is sent to the server,
not the checked attribute. So the value (in this case "1") is being
persisted to the database, which may alter the state of the field in the
database.

Cheers
Ken

"Ken Schaefer" <ke*******@THISadOpenStatic.com> wrote in message
news:eg**************@TK2MSFTNGP10.phx.gbl...
: Are you talking about a HTML form?
:
: If so, what is the *value* of the checkbox, since that's what you're
saving
: to the database.
:
: Cheers
: Ken
:
: "Jack Buick" <ja*******@earthlink.net> wrote in message
: news:%2****************@TK2MSFTNGP09.phx.gbl...
: : Talk about a basic question, but this is making me nuts.
: : I have a form with several check boxes ... they are all set to default
: : to "unchecked." The db also defaults to unchecked. But, as soon as we
: : hit the "form1.recordset.addnew" all of the cb's change themselves to
: : "checked." ???
: : Thanks in advance
: : Jack
: :
: : *** Sent via Developersdex http://www.developersdex.com ***
: : Don't just participate in USENET...get rewarded for it!
:
:
Jul 19 '05 #3
Sorry ... I should have been more specific. It is a standard no-frills
VB6 form. The db is an .mdb. The value of the check boxes in both
cases is 'false.'

Jack

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
5
by: Doug Baroter | last post by:
Hi, DDL: -- create table #task (taskID int identity(1,1) primary key, taskName varchar(25) unique, taskCompleteDate dateTime, taskComplete bit default(0)); /* Business Rules: a) if...
2
by: Doug Baroter | last post by:
Hi, DDLs and DMLs: create table #job (jobID int identity(1,1) primary key, jobName varchar(25) unique not null, jobEndDate dateTime, jobComplete bit default(0), check (( is null and = 0) OR (...
3
by: RAD | last post by:
I am working with an evaluation copy of SQL Server 2000 for the first time; my DB experience lies with MS Access. I have a simple table in SQL Server (tblCompany) that has a field called...
2
by: Chris Podmore | last post by:
I don't know if this is the correct newsgroup but I couldn't find one for Windows Services Is it possible to check that a Windows Service is still running from another machine The idea being a...
11
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. It is greatly appreciated. Is there a way to programmatically check for .NET Framework versions installed on the computer? -- Michael Bragg,...
1
by: Java Kumar | last post by:
Hi Friends, I have a form which contains elements such as check boxes,text box,text area ., Problem is in Check boxes. By default, Check boxes are unchecked and text boxes...
4
by: Paul | last post by:
How do I default a Check Box to have the tick already in it
2
by: skt | last post by:
CREATE PROCEDURE NYCIKCP.LIB_SEQUNCE_GEN(IN "@ADB_DIVISION" VARCHAR(32)) SPECIFIC LIB_SEQUNCE_GEN MODIFIES SQL DATA NOT DETERMINISTIC NULL CALL LANGUAGE SQL BEGIN DECLARE SQLSTATE CHAR(5)...
0
by: malsh1358 | last post by:
Hi I need check required elements and attributes in JAXB java classes , if there are any value for them place it , otherwise place default value in xml file , because of it I upgrade JAXB2.0 to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.