| View previous topic :: View next topic |
| Author |
Message |
dmn150 General User

Joined: 12 Jun 2009 Posts: 9
|
Posted: Fri Jun 12, 2009 12:58 pm Post subject: help with a tricky form [SOLVED] |
|
|
I am working on a database for student records for a small school. I have these three tables:
Courses, which has the following fields:
CourseID (Auto-increment integer)
Title (Text) (The name of the class)
Students, which has the following fields:
StudentID (Auto-increment integer)
StudentName (Text)
Enrollment, which has the following fields:
PriKey (Auto-increment integer)
CourseID (from the Courses table)
StudentID (from the Students table)
Every course has multiple students. Every student will be take multiple courses.
I want to set up a form to update the enrollment table, that is, to enter which students are enrolled in a given class, or to later edit that list, as students add the class or drop out.
The course Titles are entered in a separate form, as the courses are designated before the students enroll.
I'm having difficulty creating a form that doesn't modify the "Courses" table, but still allows me to enter students into the "Enrollment" table.
Any ideas are welcome. If I need to provide more information, or clarify anything, please ask.
Doug
Last edited by dmn150 on Sat Jun 13, 2009 7:50 pm; edited 2 times in total |
|
| Back to top |
|
 |
MSPhobe Super User

Joined: 29 Sep 2005 Posts: 529 Location: England
|
Posted: Fri Jun 12, 2009 4:12 pm Post subject: |
|
|
At the risk of being annoying when I'm only meaning to be encouraging....
That should be easy. Should just work. A "read only" somewhere might be the secret.
Sorry... it's late... my brain is foggy. Do let us know if you find the answer? |
|
| Back to top |
|
 |
dmn150 General User

Joined: 12 Jun 2009 Posts: 9
|
Posted: Fri Jun 12, 2009 9:36 pm Post subject: |
|
|
| Quote: | | That should be easy. Should just work. A "read only" somewhere might be the secret. |
That was enough to get me thinking right, so thank you. I based the main form on a query that showed CourseID and Title. Coming from a query made it read only. The subform is based on the enrollment table, allowing me to enter who are enrolled in the course.
The only problem is, that the query only provides me with the courses that already have student records associated with them (some quick data that I entered directly into the table). It does show any courses that have no students enrolled yet, so I have no way to "enroll" the students in those classes. I'm still working on that one. |
|
| Back to top |
|
 |
MSPhobe Super User

Joined: 29 Sep 2005 Posts: 529 Location: England
|
Posted: Fri Jun 12, 2009 11:01 pm Post subject: |
|
|
You could "cheat", and do the first student by hand....
But I bet you could get a complete list of courses with a different query. You HAVE based the "make a list of courses" query on the Courses table.... haven't you? (Grin) |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Sat Jun 13, 2009 12:14 am Post subject: |
|
|
Hello
Maybe this link can help you. The problem is the same.
I think post: Posted: Sun Jun 07, 2009 6:39 pm
Romke |
|
| Back to top |
|
 |
dmn150 General User

Joined: 12 Jun 2009 Posts: 9
|
Posted: Sat Jun 13, 2009 2:13 pm Post subject: |
|
|
I think I have my problem solved, the two suggestions by MSPhobe got me on the right track:
| Quote: | | You HAVE based the "make a list of courses" query on the Courses table.... haven't you? (Grin) |
| Quote: | | That should be easy. Should just work. A "read only" somewhere might be the secret. |
I decided to not use a query at all, but base the main form on the Courses table, making the CourseTitle the only displayed field, and making it read only. The subform is based on the Enrollment table, displaying only the StudentID field. The mainform and subform are linked via the CourseID fields. This allows me to add students to any course, even those which have no students enrolled yet  |
|
| Back to top |
|
 |
|