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

QuestionForm creation

Status
Not open for further replies.

LannyH

Technical User
Oct 3, 2002
3
IT
I am making a database to be used as a question form. So far I have created tables concerning respondents information and questions and answers tables as well as queries that join the questions with the answers. Two questions: (1)After inserting the respondent's info, I want to be able to recuperate their name and have the telephone n° pop up on its own. How do I do that? (2) How can I create a form that gives me the question only once even though there are multiple possible answers? Thanks LannyH
 
(1)After inserting the respondent's info, I want to be able to recuperate their name and have the telephone n° pop up on its own. How do I do that?

Do What ?
What do you mean by "recuperate" ?
Where do you want the PhoneNo to pop-up to ?
Where are you storing it ?



(2) How can I create a form that gives me the question only once even though there are multiple possible answers?

Well that depends on your schema.
I assume this is a multi-choice type Q & A thing. The schema will depend on whether you have a guaranteed No. of answer options.
If you can then you'll have a structure like
tblQuestions
QuestionId
QuestionText
Choice1Text
Choice2Text
Choice3Text
Choice4Text


If you cannot guarantee max no. of answer options then you'll need

tblQuestions
QuestionId
QuestionText

tblChoices
ChoiceId
QuestionRef Foreign Key to tblQuestions.QuestionId
ChoiceText


Either way, listing tblQuestion.QuestionText wil give you what you need.


'ope-that-'elps


G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Thanks LittleSmudge! I should have been clearer. I must insert the respondents info in one table and I must reinsert it in the question form. I want to insert the name into this form and have the phone number come up in the telephone field of the form. But I don't want to use codes!! LannyH
 
I must insert the respondents info in one table and I must reinsert it in the question form

You want to DISPLAY it on the Question Form !


But I don't want to use codes!!

I assume that by "codes" you mean VBCode :-

Why on earth not ?
That's like saying I want to drive my car but not use any petrol !


If you really don't want to use code then:-
That the combo box called cboPickPerson and have to PrimaryKey of the table that holds their data as the bound column.

In the txtPhoneNo text box control put
=DLookup("PhoneNumber","tblPersonDataTableName","PrimeKeyFieldName = cboPickPerson)

This will display the person's phone number after you set the combo box. However, before you set the combo box it will display #Error.

Much nicer to do it in the combo box's AfterUpdate event.


'ope-that-'elps.
G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Thanks LittleSmudge! I think I might just be able to now. I should mention that I am NOT a programmer but a lawyer - that's why I don't want to use VBCodes... I would rather pedal than drive!!
LannyH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top