Easy way to have 10 question on seperate forms save to single tabl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 10 questions that need to be on seperate forms due to the text size of
the questions and answers. I need to know how to get all of the information
saved into one table under the Same SSN. These questions will be asked more
than once on different dates so there will be multiple entries of the same
SSN.
 
Can't you just have the users scroll down on a single form?
That way all the questions would be on one form.
 
I suppose you could have a module-level variable to hold the SSN. You'll
need to set the DefaultValue of the Datestamp table field = Date().

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
You can link the forms together with a button usung the ssn as a link.

Code on click:

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "your-next-forms-name"

stLinkCriteria = "[SSN-field-name]=" & Me![Box-where-user-enters-there-ssn]
Docmd.OpenForm stDocName, , , stLinkCriteria

HTH
 
What if I make the question and answer not visible once then answer it and
then make the next question and answer visible will this work on the same
form?

Basicly will it save the data if it is hidden.
 
Yes, the data will be saved, even if hidden - as long as each control is
bound to a database table field.

Your suggestion of controlling visibility will work, provided the answers
for each person are stored in the same record, but you'll need code to
handle the visibility from one question to the next.

However, I would expect each question and answer to occupy a single record
each, rather than multiple fields within the same record. What I mean is,
you should have two tables; one for questions and one for answers:
tblQuestions
QuestionID (Autonumber - Primary Key)
QuestionText (Text)

tblAnswers
AnswerID (AutoNumber - Primary Key)
QuestionID (Long Integer)
PersonID (Long Integer)
AnswerText (Text)

One-to-many relationship between tblQuestions.QuestionID -->
tblAnswers.QuestionID.
One-to-many relationship between tblPeople.PersonID -->
tblAnswers.PersonID. tblPersonID would contain the person's SSN.

The above schema would be the ideal, but it would mean that your suggestion
of simply controlling visibility on the same form wouldn't work, because
each answer would be saved to a different record. To use this schema, you
would need to use a continuous form or several forms.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top