OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

help with a tricky form [SOLVED]

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
dmn150
General User
General User


Joined: 12 Jun 2009
Posts: 9

PostPosted: Fri Jun 12, 2009 12:58 pm    Post subject: help with a tricky form [SOLVED] Reply with quote

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
View user's profile Send private message
MSPhobe
Super User
Super User


Joined: 29 Sep 2005
Posts: 529
Location: England

PostPosted: Fri Jun 12, 2009 4:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
dmn150
General User
General User


Joined: 12 Jun 2009
Posts: 9

PostPosted: Fri Jun 12, 2009 9:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
MSPhobe
Super User
Super User


Joined: 29 Sep 2005
Posts: 529
Location: England

PostPosted: Fri Jun 12, 2009 11:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Sat Jun 13, 2009 12:14 am    Post subject: Reply with quote

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
View user's profile Send private message
dmn150
General User
General User


Joined: 12 Jun 2009
Posts: 9

PostPosted: Sat Jun 13, 2009 2:13 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group