Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    44

    Unanswered: ASP, checkboxes, and Access

    I have a form that has a question like this:

    How did you find out about us?
    [ ] Magazine
    [ ] Television
    [ ] Search Engine
    [ ] Other [textbox here]

    where the square brackets are checkboxes, and after "Other" is a text box for people to fill in if they found out in a different way.

    I have this going to an access database, and I was wondering how I could make it to where if they check more than one answer, every answer they pick will go into the "foundOutAbout" field in the database.

    For example, say someone saw us on tv, and the next day in a magazine, but also in the newspaper. I want to capture all three of those ways. Does that make sense?

    What code would I need to add to insert that data (like an if/else? but how?)

    Any help and guidance would be appreciated. Thanks.

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Use the checkbox type, and give each input the same name. When the form is posted, each value will automatically be delimited with a comma. Then it's up to you. You could store the whole string, or split it out and do something else with it...
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Aug 2004
    Posts
    44
    Thanks. That worked great.

Posting Permissions

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