I am looking for help creating a database that will perform the functions I described below, can you help me? I attached an Excel document that might give you a better idea of what I am trying to do in Access.
I open up the database and frmBegin opens with one command button named Ask Questions.
I click the command button named Ask Questions and a macro runs that selects a random question from tblQuestionsToAsk and displays it in frmAnswer. (tblQuestionsToAsk has two fields, Field 1 is titled QuestionID /datatype AutoNumber and Field 2 is titled Questions /datatype memo)
frmAnswer has the following text boxes and labels
- Question: text box that displays a random question from tblQuestionsToAsk (data type memo)
- Answer: an empty text box where I can answer the question; the data type for this empty field is also memo. (I want to be able to put long answers into this field.)
- Two command buttons below the empty text box that say
* Stop
* Continue
Once the question is answered I can either click stop or continue on the message box.
Each question has a table that holds its answers. So QuestionID #1 from tblQuestionsToAsk links to tblQ1. QuestionID#2 from tblQuestionsToAsk links to tblQ2. QuestionID#3 from tblQuestionsToAsk links to tblQ3. Each tblQ has two fields AnswerID datatype AutoNumber and Answers datatype Text. Each time I add a question to tblQuestionsToAsk a corresponding tblQ table is automatically generated to store the answers to those questions.
On frmAnswer
- If I click stop the answer I gave will be put into the appropriate tblQ.
- If I click continue the answer I gave will be put into the appropriate tblQ and then a macro will select a new random question from tblQuestionsToAsk and the same process will be repeated.
Can you help me create this database?
I think my first post might have sounded confusing so I re-wrote it here. Hopefully my question is clearer now.
I have a database with one table called tblQuestionstoask. This table contains two fields and 200 records (Each record contains one question and I intend on adding more records). The first field is Question ID / data type auto number the second field is Questions to ask / data type memo.
I am looking for help creating a macro for this database that will.
1) Open a form or message box (whichever works better) with a random record containing a question from tblQuestionstoask and a field to give an answer. After the user gives an answer and presses enter…..
2) A new table will be created for that question and all the answers given for that question henceforth will go into that table. Once any question is asked more than once the answers will go into the table that has already been created for the question, no new tables will be created.
Can you tell me how I can add these functions to my current database?
Hi Teddy,
Why do you need to have seperate tables for each answer? It would far be easier (and conform to the rules of normalization) to have a single table, "tblAnswer" that includes AnswerID, QuestionID, GivenAnswer etc.
Cheers,
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Post solved
Last edited by Teddy; 12-19-2009 at 04:18 PM. Reason: SOLVED
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks