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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining Question and Answer Text in a memo field

Status
Not open for further replies.

jwkauppila

Technical User
Mar 8, 2002
2
US
I have a table with an activityID (unique for each user), a questionID and questionText, and an answerID and answerText.
Each user(activityID) has been asked a question and has given an answer set (like a single yes/no answer, or an a,b,d and e answer set).
In a memo field in a table to be sent to the client, for each activityID, I need to list the questions the individual was asked and the answers they selected. Some questions have more than one answer.
It should look like this: questionText1: answerText1, answerText2, answerText3; questionText2: answerText; QuestionText3: answerText1, answerText2...
I hope this is enough information and I thank you in advance for your help.
Howbouthat.
 
I would suggest you post this question in the Table design forum, because I think you can improve the efficieny of your database greatly by restructuring it.

It looks as if you would be better having a table for possible questions (tblQuestions?), a table for the possible answers (tblAnswers?), & a table which then combines these questions & answers with a specific user.

Also how does ActivityID relate to a user. Would User be a better name for this field??

It looks as though improving your database structure would make getting the resultsets you want much simpler...


HTH

James Goodman
 
The database is already designed as you described in your response. The table to which I was referring was built from separate tables containing the information I described.
That being so, how do I combine these elements (from the separate tables) into a memo field as I described above?
I posted the question here because it appeared that I would want to store the activityID to a variable and loop through the table grabbing the related questionText and AnswerText. This is what I'm not sure how to do.
Any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top