From: Gntlhnds on
I was thinking the problem was my tables. Here's my current structure:

tblStudents:
StudentID
Last Name
First Name
Class #

tblCourses:
CourseID
Course

tblCourseGrades:
GradeID (Primary Key)
StudentID (Foreign Key)
CourseID (Foreign Key)
Grade

tblStudents has other fields, but those are the only ones that pertain to
setting up the grades. I know the naming convention for the field names
isn't proper, but I inherited the database and I'm afraid of changing the
field names because it might cause many other things to fail in the database.

Here's how my school operates:
Student shows up and is assigned to a class. The class takes the 13 classes
sequentially. A few weeks later some more students show up, are assigned to
a class, and they start the courses as well, taking them sequentially.
Hopefully that helps clear up what I'm looking for and expecting. I was
thinking I could just create a form that I could select the student from a
combo box, and the subform would list the courses and allow me to input the
student's grade for each class (to be stored in tblCourseGrades). Then I
would create report(s) that would allow me to take those grades and output
them in various formats (one individualized for the student, one for the
class, and then whatever other ones I get tasked to provide). I really do
thank you for helping me out and trying to make me understand how this is
really supposed to work.
From: John W. Vinson on
On Fri, 23 Apr 2010 11:14:01 -0700, Gntlhnds
<Gntlhnds(a)discussions.microsoft.com> wrote:

>I was thinking the problem was my tables. Here's my current structure:
>
>tblStudents:
>StudentID
>Last Name
>First Name
>Class #

What's Class#? I'd remove the blanks from the fieldnames and avoid using # -
it's a date delimiter and can cause problems in fieldnames. If you do keep
them you must ALWAYS use [square brackets] around the fieldnames.


>tblCourses:
>CourseID
>Course
>
>tblCourseGrades:
>GradeID (Primary Key)
>StudentID (Foreign Key)
>CourseID (Foreign Key)
>Grade

That appears to be correct. You might want to create a unique twofield index
on StudentID and CourseID to prevent one student from being signed up to the
same course twice.

>tblStudents has other fields, but those are the only ones that pertain to
>setting up the grades. I know the naming convention for the field names
>isn't proper, but I inherited the database and I'm afraid of changing the
>field names because it might cause many other things to fail in the database.
>
>Here's how my school operates:
>Student shows up and is assigned to a class. The class takes the 13 classes
>sequentially. A few weeks later some more students show up, are assigned to
>a class, and they start the courses as well, taking them sequentially.
>Hopefully that helps clear up what I'm looking for and expecting. I was
>thinking I could just create a form that I could select the student from a
>combo box, and the subform would list the courses and allow me to input the
>student's grade for each class (to be stored in tblCourseGrades). Then I
>would create report(s) that would allow me to take those grades and output
>them in various formats (one individualized for the student, one for the
>class, and then whatever other ones I get tasked to provide). I really do
>thank you for helping me out and trying to make me understand how this is
>really supposed to work.

You're doing OK. I'd suggest basing a Form on tblStudents; use the combo box
wizard to create an unbound combo on the form to navigate to a particular
student's record (use the option "Use this combo to find a record" in the
wizard).

On the form you would put a Subform based on tblCourseGrades. This subform
would use the StudentID as the master/child link field, and have a combo box
for the CourseID; the combo's rowsource would be the Courses table to let you
pick which courses for that student. The combo will show all the courses. Next
to the combo you'ld have a textbox to enter the grade.
--

John W. Vinson [MVP]
From: Gntlhnds on
Man, this helped so much. This is what I started to try to do, but for some
reason I couldn't get the darn thing to work properly. Your step-by-step
instructions was just what I needed.

About the naming conventions, I unfortunately inherited this database, so
normally I would try to adhere to them, however, I'm afraid that if I change
the names of things, they wouldn't propagate properly. I've already tried
renaming various forms, tables, reports, and queries, and things ended up not
working, and I'd spend hours going back through trying to find places where
the changes didn't propagate.
From: John W. Vinson on
On Mon, 26 Apr 2010 07:04:04 -0700, Gntlhnds
<Gntlhnds(a)discussions.microsoft.com> wrote:

>Man, this helped so much. This is what I started to try to do, but for some
>reason I couldn't get the darn thing to work properly. Your step-by-step
>instructions was just what I needed.

Glad to have been of help, and good luck with the database! Don't hesitate to
post back if you still have problems.
--

John W. Vinson [MVP]
From: Gntlhnds on
I am actually having another problem. I'm trying to do a report and in the
footer of StudentID I have an unbound text box to calculate the average grade
for each student. Here is the formula I'm using: =Avg(IsNumeric([Grade])).
It doesn't return the correct grade (-0.825), and it gives the same answer
for each student. Any thoughts? I know this is the Forms thread, so I can
move this question to the Reports if need be.

"John W. Vinson" wrote:

> On Mon, 26 Apr 2010 07:04:04 -0700, Gntlhnds
> <Gntlhnds(a)discussions.microsoft.com> wrote:
>
> >Man, this helped so much. This is what I started to try to do, but for some
> >reason I couldn't get the darn thing to work properly. Your step-by-step
> >instructions was just what I needed.
>
> Glad to have been of help, and good luck with the database! Don't hesitate to
> post back if you still have problems.
> --
>
> John W. Vinson [MVP]
> .
>
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: Tab sequencing not working
Next: Subforms limitation