If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > ASP, checkboxes, and Access

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-04, 17:59
thespursfan thespursfan is offline
Registered User
 
Join Date: Aug 2004
Posts: 44
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.
Reply With Quote
  #2 (permalink)  
Old 11-15-04, 20:29
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 11-17-04, 11:55
thespursfan thespursfan is offline
Registered User
 
Join Date: Aug 2004
Posts: 44
Thanks. That worked great.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On