Converting Records to Checkbox Values

Results 1 to 2 of 2

Thread: Converting Records to Checkbox Values

  1. #1
    Join Date
    Dec 1969

    Default Converting Records to Checkbox Values

    I am in the process of creating a data-driven website. In this site there will be a form containing different criterias from street names to demographics. When I type in a street name or pick a certain criteria, it will then read directly from a database and find the records that match the criteria, the transition is working perfectly . My question is this though. How would I automatically attach a checkbox to each of the records so that the user may now pick which records they would like, save those records so they may search for more criterias and when they are ready submit it onto a form and have the records they picked be listed before sending me the information so they can double check the records that they picked. I would appreciate assistance!

  2. #2
    Join Date
    Dec 1969

    Default Use the primary key... the value of the checkboxes.<BR><BR>Give all the checkboxes the same name.<BR><BR>&#060;INPUT Type=Checkbox Name="recid" Value="&#060;%= RS("primaryKeyField") %&#062;" &#062;<BR><BR>And then, in the next page, you can do simply:<BR><BR>&#060;%<BR>SQL = "SELECT * FROM table WHERE primaryKeyField IN (" & Request("recid") & ")"<BR>%&#062;<BR><BR>If your primary key field is *not* a number, then see the ASPFAQs for how to use text keys in this same way.<BR><BR>

Posting Permissions

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