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

Coding a Survey. How to enter 1 record with as many Forms as Fields

Status
Not open for further replies.

locolini

MIS
Apr 15, 2002
15
US
I'm developing a "Survey" application with Access. I have one table containing the questionnaire data:

ID
q1
q2
q3
...etc...

Now for every field (q1, q2, q3...) I need to have a form, in other words for every question I need a form, so I need

for q1, frm1
for q2, frm2
for q3, frm3
...etc...

1) I would like to hear your suggestion/approach about "staying" on the current record as I move from form to form (field to field, q1 to q2)

2) I'm worrying about running out of RAM with so many forms open (100 questions aprox.) What if I close the form as soon as I press a "next" button to move to the next form (question). Will that be an enough good idea to avoid running out of memory?

Thanks in advance!


 
silly question I know but have you thought of less forms and page breaks?

or would this defeat the object of the exercise?

Why do you have to have a single form for each question?

jo
 


Sorry that wasn't clear I meant using page breaks on your form

I missed the using out on the first sentence


regards

Jo
 
I'm dying to hear the answer to Jo's question about why you need a form for every question?
Ann
 
Good question. Simple answer: the "one form to one question" is part of the research methodology, I'm afraid I can't change that.

In other words, the survey requires that the “user” responding to the survey questions must be prompt it one question at a time.

Thanks!
 

Hi there again


I 've just done a quick mock up of a survey Db and a few thoughts emerged.

Do any of the questions have optional answers
do the questions have answers at all (user input only)
Are your questions a mixture of the above

What is the research methodology that has enforced such a draconian measure.

if you have an email I'll quite happily send you the mock up structure and with a little more information may be even an example of a single form data entry method for your requirement

regards

jo
 
even with page breaks, you will still probably run out of room, thus need several forms. You could have separate forms for each 'section' of the survey, then page breaks for each question within the section. Use form+subform to keep 'current', the main form contains the RespondantID and say Date Entered and the subform contains the questions.

Another approach could be to have a table for Questions, a table for respondants, and a table for results e.g.
[tt]
tblQuestions:
QID (ID of question)
QText (Text for the question)
QType (e.g. 1=textbox, 2=combobox)

tblRespondants:
PersonID
Other info

tblReponses
PersonID
QID
Value (text field)

tblValue (store list for combo box)
QID
ValueID
ValueText
[/tt]

Again, use continuous forms to display the data and perhaps the OnCurrent event to figure out whether to use a textbox or combobox for the user to enter the data into. Or use an unbound form and use code populate it for each question, and to move between questions etc. Use cross-tab queries to get the data into statistical packages.

however, my reply is premature, as i don't know much about your survey, but i'm off on holiday tomorrow.

Cheers,
Dan
 
Sorry to butt in folks. As an ex-research scientist I would always go back and question the methodology! But failing that and not knowing the number of questions, I have tried a different track to save forms in the past.

If you use the visible property of controls you can make then appear/disappear using code according to circumstances. I did this some time ago (I was using Paradox in those days), and by overlaying controls on top of each other, you can do a lot more in one form than you would think possible. OK, the form looks horrible in design view and is even worse to manage and code, but it sure as hell impresses the punters!

As I say, I don't know how many questions there are, or how many potential routes the answers would take you to, but it's an idea that does work under certain circumstances.

Simon Rouse
 
Hi again

Dr Simon & I are on the same wavelength here and as we have both done research and surveys - re inventing the wheel comes to mind.

You will run out of space no matter what if you go down your proposed road & take my word that road is littered with bouncing betties if you take the memory away from access.

Do we have a forum for bomb squads?

regards

jo


 
Yep, thats what i was getting at and the reason for the 'QType' in tblQuestions table. There are many ways to handle questionnaires, but i've found cross-sectional epidemiological ones to be the worst to deal with.

One day i'll be able to put the prefix 'ex-' to research too :)

Cheers,
Dan
 
You're probably right Dan. I've not done epidemiology but I have done work on hospital acquired infections. I spent ages designing a database application and when I created the fairly product, the microbiologist decided that she wanted to change the way antibiotics were recorded, which effectly meant I had to start again.

The question is 'locolini' - what did you do in the end?

Simon Rouse
 
<<The question is 'locolini' - what did you do in the end?>>

First of all, I would like to thank everybody who answered my post. Now the details:

In the end I used a “mix” of many of your suggestions. I used:

1) Form+subform for the introduction of the survey (Suggestion by DanJR).
2) Visible property suggested by DrSimon.
3) I “reused” objects especially for type of answers, options, text, scale, etc.

This was the easy part. I worked on a prototype and I happily coded for hours. However, a hit a brick wall when I try to rotate and randomize questions. I just couldn’t figure this out. While working on this challenge the client call me to cancel the project!

So here I am now, with no project and my head spinning, but still thinking how I can make randomization work. Now it has become a personal challenge!

I will like to hear what, if any, it has been your approach to random questions.

In my initial post, to make things easier, I never mentioned the “detail” that the questions where under 2 “loops” where the 1st one required a rotation from interview to interview, i.e.

Interview 1: product A, product B, product C, D
Interview 2: product B, product C, D, A
Interview 3: product C, product D, A, B
Interview 4: product D, A, B, C

and the 2nd loop required a randomization of attributes, i.e.

Interview 1:

For product A,
Attribute 1, Attribute 4, 3, 2 …

For product B
Attribute 4, Attribute 3, 1, 2 …

For product C
Attribute 3, Attribute 1, 2, 4 …

Interview 2:

For product A,
Attribute 3, Attribute 4, 2, 1 …
…etc…

Programmatically it may look as follow:

//x=1 to 10
do while product(x)

question regarding product(x)

//z=1 to 22
do while attribute(z)
question regarding product(y) on attribute(z)
z = z +1
end do

x = x + 1
end do


Thanks again to all of you who kindly offer their expertise. It is really helpful to brainstorm with you all the possible approaches.

Have you worked with random questions? What has been your approach? Thanks in advance.








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top