Recurring UserForm

  • Thread starter Thread starter Matt Weyland
  • Start date Start date
M

Matt Weyland

I have a DB that is used to manage survey information.
Each survey has multiple questions, every question has
multiple responses. I am currently using a user form that
displays the question and the responses for a particular
question. The QuestionID is stored in a module and can be
called. The problem is that I want to use the same form
over and over again for each question. When a user clicks
on next on the bottom of the form I want the form to
rebuild based on the new record.

I have tried creating the form in Modal and used a module
with a do while not rs.eof..... The problem is that I
can't seem to figure out how to maintain focus on the form
until a response is provided, then when the next button is
clicked have the record set move to the next record.

One other problem with this, this is an inherited DB and
the table construct is a little peculiar. The schema has
been set up with supertype/subtype that needs to be
enforced via code. Two tables store virtually identical
data and the table in which the data is stored defines
what type of question it is. However, this information is
stored on a Question table. So for every question it
needs to find what type of question it is, then based on
that look in the respective table find all of the
responses for that question, then dynamically build the
user form to capture the response for a particular surveyee
(person who took the survey). The question text and
question type are in one table and the response
information is kept in the supertype/subtype table.

Any suggestions one might have are greatly appreciated.
Also, if you have any questions, just let me know.
 
How about creating a subform for each question type. Then based on the
question type change the source of the subform in the main form. I've done
this before myself. The code runs a little slow if you have a lot of
controls on the subform, but if you only have a limtied number of choices it
shouldn't be noticable. If you need more help on this let me know.

Kelvin
 
This will work, but will not provide the effect I am
hoping to achieve. I want the user to konw that each
subsequent screen will display a new question with each of
it's respective responses.
 
Back
Top