Basic question

G

Guest

I'm creating a database to track student tardies. I have one table that
contains the student info, with StudentID as the primary key. I also have a
Tardies table that uses Date and Period as combined keys, and also has a
Remarks field and is joined on StudentID in a one-to-many relationship.

I have a query that shows StudentID, LastName, FirstName, Date, Period, and
Remarks. I've created a Form with a combo box to select the StudentID, which
then fills in the LastName and FirstName fields. I also have an Option Group
for the seven periods in a day.

The purpose of this Form (which is based on the above query) is for a
teacher to click the Combo box, select the student's ID number, which puts
the name in the correct fields, then allows the teacher to select the period
the student is tardy for.

The problem is that in my sample data, if a student has more than one tardy,
his/her name shows up for each tardy. This form should only be an Input form;
another form will show total tardies.

Any ideas?

Jim
 
D

Dave

You might want to reconsider your form design to use a sub form.

Typically with a one to many relationship like student to tardies you would
use a main for for the parent (student) and a subform for the child
(tardies).

Thus in your parent form for you would have all of your student related
data. The details for any tardies would be displayed in the subform.

I would also do away with the option group. If I understand correctly,
you're going to display seven options for each day. This is a waste of
resources when students may only be tardy 1 or 2 periods in the day. Set
the subform up with datasheet or continuous forms as the default view and
then have a drop down list for your period and textboxes for the date and
remarks. That way only the tardy periods associated with the student will
appear, not every period.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top