two main forms, one subform, is that possible?

lovedieer

Registered User.
Local time
Yesterday, 21:48
Joined
Nov 4, 2009
Messages
28
I am working on a survey database. I build three tables: Demographic, Questions and Response. As their name, the demographic include all indiviudal's personal information, the question table include 20 survey questions, and Response table include the responses, comments and other information. Both demographic and question tables are one side, and Response table is many side.

I want to build a form, which have demo information at top, all the 20 survey questions are listed at the left bottom, and the response is correspondingly list at the right bottom. it will looks like this:

Name____ Education level______ Gender___ City______ State______

Que Question Description Response Comment1 Comment2
q1 XXXXXXXXXXXXXXXXXXXXXXXXXXX Y/N XXX XXXXX
q2 XXXXXXXXXXXXXXXXXXXXXXXXXXXX Y/N XXXX XXXXX
.
.
.
Q20 ...

Any help are appreciated.
 
So....what's the question?

btw...sounds like it should be 1 main form (Demographic) and two Subforms (Questions and Responses). Yes, that is possible.
 
oops! Forgot my questions.

My question is I cannot make the form like the outline I descripbe above. I have hard time to put all the questions and responses together in one page. I have to go to next record in subform.

Another question is If I use questtion as a subform, I am confused about the relationships among these three tables.

My table relationship is

Demo
Answers
Questions

Both Demo and Question table are one side, the Answer table is many side.

If Demo is main form, questions table have nothing to link to Demo table.

Thanks.
 
Well, off the top of my head, here is how I would start the project.

1. Design the Demographic table with the relavent data.
2. Design the Question Table. I would design it as follows:
tblQuestions
QuestionID (Primary Key)
QuestionaireID (Foreign Key)
Question (Actual Question)

tblQuestionaire
QuestionaireID (PK)
QuestionaireDesc

The reason for the two tables is that it allows you to be able to use the database for more than just one questionaire.

3. Design the Answer Table. Would have the following:
tblAnswers
AnswerID (PK)
DemographicID (FK)
QuestionID (FK)
Answer

The Demographic would be the main form. Have a combo box to select the questionaire. The questionaireID is used to filter the question list which will be a subform.

The answer part seems like the trickiest. I can think of two ways. Probably the best way would be to have an unbound text box on question subform. Have the person fill out the text box with the answer. Have a button as well. Once the button is clicked, it can take the answer from the text box, the QuestionID from the record and the DemographicID from the main form. Build a Sql Insert statement using those values and put the results into the Answer Table. You would have a subform based on the Answer table on the right and requery the subform after the insert.
 
Thanks for the help. I will try it. This is my first time to use Access. I may have more problems later.
Thanks again.
 

Users who are viewing this thread

Back
Top Bottom