Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List boxes filling in multi answers on table

Status
Not open for further replies.

Jeanie

Technical User
Jun 14, 2000
86
US
I have put a survey on ACCESS. Most of my questions have combo boxes that are used to enter the resonses. However, I do have a couple of list boxes because there are a couple of questions where the clients can answer more than one question. I set the form up with a lot of help from Tek-Tips. However, I think I missed a step. Now when I try to pull up the data to see what was answered there are blanks in any of the questions that had list boxes. Did I need to set something up differently on the table to accept more than one answer??

Any help would be appreciated!
 
I do have a couple of list boxes because there are a couple of questions where the clients can answer more than one question.
I assume you mean provide multiple answers to a question. Like 'foods you like' being 'apples, bananas, celery'.

Did I need to set something up differently on the table to accept more than one answer??
Although you could in theory make a single text string with all the answers stuck together as one, this isn't usually a good idea.

You probably need another table with a one-many relationship. If you have an "response_id" field for each survey respondant in the main table, use that as the link into the new table.

So the new table would have, say, three records like:
Code:
reponse_id   Answer
----------   ----------
123          Apples
123          Bananas
123          Celery
124          Apples
124          Blueberries


 
You assumed correctly on the first part - sorry about that!

You mentioned that there could be a single text string (even though it isn't a good idea). Would I have had to set it up to accept that? My concern is that we did some surveys over the phone and when customers answered "apples and oranges" we marked both on the ACCESS data-base - we didn't write the answers down anywhere. So, I am hoping (but doubting) that I haven't lost that information.

For my next one, I will try to set it up as you suggested with a table with one-many relationship. If I understand correctly, I will have my original table and then link it with a one many relationship to a new table. The new table would only need the two fields "response_id" and "Answers". Do I still create the form using the orignal table only? Or how do I get the information onto the second table? I know - it sounds like I have no idea what I'm doing - which is pretty much true!

Thanks,

Jeanie
 
The way to know for sure if you've 'lost' the data, is to open up the table and look. If it's not there, you're out of luck.

For your next one, yes you could set it up the way you said. Then, set up the relationship in the relationship window. Then use the 'autoform' wizard on the main table. With the one-many relationship set up it will create a form with a subform for that question. It's a bit crude but it will give you one idea.

To do this with a multi-select list-box will require some coding, unless anyone else has a better idea....


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top