In order to use 2 update record forms on a single page, I
have used the update server behavior for the first form and I have
created an update record processing page for the second form,
meaning that the form's action is to go to the processing page
containing the update query code. All fields update fine for this
second form except for a checkbox field. The checkbox's initial
value is dynamically set using dreamweaver's dynamic button.
However, the value remains "checkbox" regardless if the box is
checked or not. I suppose the update server behavior handled this
issue in my first form as this problem did not occur there.
Following is the checkbox code. Please advise how to make the value
to True or False based on if it is checked or not.
<form ACTION="morecontactsprocessor.asp" method="post"
name="morecontacts" id="morecontacts">
<input name="emailprob_mor" type="checkbox"
id="emailprob_mor" value="checkbox" <%If
(CStr((rs_morecontacts.Fields.Item("emailprob_mor").Value)) =
CStr("True")) Then Response.Write("checked") :
Response.Write("")%>>
update Code on morecontactsprocessor.asp's page:
objConn.Execute("UPDATE morecontacts_mor SET
firstnm_mor='"&Request.Form("firstnm_mor")&"',
lastnm_mor='"&Request.Form("lastnm_mor")&"',
phone_mor='"&Request.Form("phone_mor")&"',
altphone_mor='"&Request.Form("altphone_mor")&"',
fax_mor='"&Request.Form("fax_mor")&"',
cellphone_mor='"&Request.Form("cellphone_mor")&"',
email_mor='"&Request.Form("email_mor")&"',
altemail_mor='"&Request.Form("altemail_mor")&"',
emailprob_mor='"&Request.Form("emailprob_mor")&"' WHERE
contactid_mor="&Request.Form("contactid_mor")&" ")
Response.Redirect("addcustomer.asp")