Error when using mult. check boxes in record set

Results 1 to 2 of 2

Thread: Error when using mult. check boxes in record set

  1. #1
    Join Date
    Dec 1969

    Default Error when using mult. check boxes in record set

    To anyone who can help,<BR> I am using a form to add a record set to my acces database. I am receiving an error on one specific form object that uses uses check boxes and allows the user to select multiply check. This error only occures when more than one check box is cecked below is the error, form object and the connection object and the asp code to add the record. This is a past due project so any help would greatly be appeciated.<BR><BR>Thank You<BR>Aaron Custer<BR><BR>----Error generated----<BR>Error # 80040e21<BR>error occured<BR>addjob.asp, line 22<BR>-----------------------<BR><BR>----Code from the form that has the check boxes----<BR>&#060;input type="checkbox" name="JobCategory" value="Healthcare Accounting and Finance"&#062;&nbsp;Healthcare Accounting & Finance<BR>&#060;input type="checkbox" name="JobCategory" value="Accounting and Financial"&#062;&nbsp;Accounting & Financial<BR>&#060;input type="checkbox" name="JobCategory" value="Information Technology "&#062;&nbsp;Information Technology <BR>&#060;input type="checkbox" name="JobCategory" value="Human Resources"&#062;&nbsp;Human Resources<BR>&#060;input type="checkbox" name="JobCategory" value="Temporary Staffing"&#062;&nbsp;Temporary Staffing<BR><BR><BR>-----Connection object from Addjob.asp----<BR>set rsJob = Server.CreateObject("ADODB.Recordset")<BR> rsJob.Open "jobs", db, adOpenForwardOnly, adLockOptimistic, adCmdTable<BR><BR>------The asp code that refrences the form to update----<BR>line 22<BR>rsJob("JobCategory") = Request.Form("JobCategory")<BR><BR><BR>Thank you Again<BR>Aaron Custer<BR>

  2. #2
    Jason Miller Guest

    Default RE: Error when using mult. check boxes in record s

    Invalid use of checkboxes.<BR><BR>Each text box should have a unique name in order to return a valid value.<BR><BR>If you only want one box selectable at a time, change to input type=radio (but leave the name as "jobCategory" for all of them)<BR><BR>It&#039s probably not behind your current problems, but it will be an issue later.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts