Separate form for every record

Joshfraser.csdms

New member
Local time
Today, 04:17
Joined
Jun 18, 2016
Messages
8
Hello I want to create a table with alot of entries and then have a form for each entry. I want to add option buttons and checkboxes to each form. Can I have a form per record and can I have each form come from a template form?
Tha KS for your help.
 
Um...only if you're a masochist?

The rule of thumb is '1 table, 1 form', and it exists because that's the most logical way to handle data maintenance. The fact that you want a different form for each entry SCREAMS 'database structure problems', so before we go any further, why don't you explain precisely what you're trying to do and why you want one form for each record. Please use plain English and assume we don't know the first thing about what you're doing.
 
Thanks for your rapid response!
I want to create an exam. I don't know how many questions yet but a minimum of 200. Alot of the questions will have images(approximately 1MB per image). I know images take up alot of space and I found a way to not slow the database down by making a table with with a pathway link to the image. I then use the image control source and I can still see the image on the form. So I basically want to create an exam with images that runs with no delays. I want the questions to use option buttons and checkboxes.
 
So will the students be taking the text in the database, or will you be printing out the test for them to take?

Basically, you're looking at a minimum of two tables (three is better, more if they're taking the test in the application itself), and either a Form/Subform or Report/Subreport setup.
 
Okay, that's pretty straightforward but will require some work. You'll need:

TABLES

(The exam table isn't strictly necessary, but will allow you to store multiple exams in one database)
tblExams
ExamID
ExamName
ExamClass
(and any other information that is unique to each EXAM, like chapter, week of class, etc)

tblQuestions
QuestionID
ExamID (Use this to link back to tblExams)
QuestionText
ImgPath
AnswerMethod (1 = Pick one, 2 = Pick many, 3 = Essay)
(any other question-specific data you wish to include)

tblAnswers
AnswerID
QuestionID (Use this to link back to tblQuestions)
AnswerText
IsCorrectAnswer
(any other answer-specific data you wish to include)
(Essay questions would just need a dummy answer)

tblStudents
StudentID
StudentFN
StudentLN
(Any other necessary data)

tblResults
QuestionID
StudentID
AnswerID
AnswerText (for essay questions)


Then create a main form. In the detail section, you'd have the question number and text as well as an image frame using the image path as a source. Below that, create a subform frame. You'll need three subforms - one with an option group, one with checkboxes, and one with a memo field. You'll use code to assign the correct form to the subform frame based on AnswerMethod. The subform answers would be pulled from the Answers table, linking via ExamID and QuestionID. The option buttons, check boxes, and Essay text box would, however, actually have to be unbound and would create matching records in the Results table.

I'm sure there's more involved, but this should get you started. You have a lot of work ahead of you, I'm afraid, but it's a LOT less than creating 200 different forms (especially as you'd still need most of these tables).
 
Last edited:
Edit: The Results table wouldn't actually need ExamID, so I removed it. You also could probably get away without including Question ID, since AnswerID is already tied to it.
 
Thanks for your continuous thoughts. I'm sure that as I go through this I'll have more questions. I typically try and solve my own problems. It is just when I have tried for numerous attempts and have failed when I ask for help. I hope that I build up my skills and one day I can contribute to this forum like you do.
 
This YouTube Play list:-

https://www.youtube.com/playlist?list=PLhf4YcS5AjdqzkQ5egOuO1myweo6hNgG2

Demonstrates how to create a list in an MS Access Form. You could adapt the idea to produce a list of questions with a true or false check. Alternatively you could change the check box to a text box so that the user can provide a written answer. Unfortunately it's not possible to provide a combobox for a multiple choice type of answer yet, although I'm working on it!
 
Honestly, what I was thinking of for his answers was just a simple one-to-many relationship where each Question had 3-5 related answers. Drop that into a subform keyed to the Question, and viola, each screen shows one question with the answers available to pick from. It's not hard to switch out which form is displayed in the subform so he could switch between an option group for selection of a single result and a set of check boxes for answers with multiple results - then it's just showing him how to set it up to display the assorted answers.

That list, however, is going to be awfully handy when it's time to save his students' results. ;-)

I use basically the same list setup to handle permissions groups in my applications at work.

First things first, though - the tables and relationships definitely need to be done before we even begin to worry about forms.

Edit: Also, instead of a combo box, a list box would also work for multiple answers.
 
thank you both for your responses. In the creation of anything there is always numberous ways to achieve the results. All comments are welcomed by me and important.
 

Users who are viewing this thread

Back
Top Bottom