Radiobuttons writing to MS Access

Results 1 to 2 of 2

Thread: Radiobuttons writing to MS Access

  1. #1
    Join Date
    Dec 1969

    Default Radiobuttons writing to MS Access

    Hi!<BR>I&#039;m creating a database from an online form. Gender is an issue on this site, and I need to know the gender of entrants.<BR><BR>I&#039;ve set up 2 columns in Access (both are Yes/No datatypes but that can change)<BR><BR>i can&#039;t figure out how to write the information from hte web form to the Database.<BR>&#060;form&#062;<BR>Boy &#060;input type="radio" name="radiobutton" value="boy" checked&#062;<BR>Girl &#060;input type="radio" name="radiobutton" value="girl"&#062;<BR>&#060;/form&#062;<BR>htis is how it is set up on the form.<BR><BR>Thanks for any help

  2. #2
    Join Date
    Dec 1969

    Default RE: Radiobuttons writing to MS Access

    Could you not just use some code like this. This checks to see if any of the boxes are checked and then depending on what is check is assigns that value to the variable sex.<BR><BR>You can then use the variable sex is your SQL statement to add it or update it to the database. I am new to this so, please take it easy on me guys if this is not right hehe...<BR><BR><BR><BR>&#060;%<BR><BR> If Request.Form("chkspam") = "male" THEN<BR> sex = "male"<BR> <BR> END IF<BR> IF Request.Form("chkspam") = "female" THEN<BR> sex = "female"<BR> END IF<BR><BR>%&#062;

Posting Permissions

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