Check Box Default

J

Jack Buick

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
 
K

Ken Schaefer

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

: 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
:
:
: Don't just participate in USENET...get rewarded for it!
 
K

Ken Schaefer

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

: 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
:
: : : 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
: :
: :
: : Don't just participate in USENET...get rewarded for it!
:
:
 
J

Jack Buick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,083
Messages
2,570,588
Members
47,211
Latest member
JaydenBail

Latest Threads

Top