PeterWieland
Registered User.
- Local time
- Today, 14:16
- Joined
- Sep 20, 2000
- Messages
- 74
I am writing a database to manage assessment grades in a large secondary school, and have come across a problem with selecting data to be displayed and edited in a subform.
I have 2 tables, one (Pupils) with fields pupil_enrolment_number, name, tutor_group and another (Results) with fields pupil_enrolment_number, teaching_set, effort_grade and achievement_grade. The tables are linked with a one to many relationship on pupil_enrolment_number (each pupil has more than one teaching set).
I then have a query which produces a list from the Results table, but looks up the name from the Pupil table. This query then appears as a subform, the main form having a combo box that selects the data based on one of the fields in the query (class).
The problem is that the first record in the query gets the value of class overwritten by the value typed into the combo box on the main form.
I have a work round by having a dummy record as the first record, but there must be a more elegant solution.
I have 2 tables, one (Pupils) with fields pupil_enrolment_number, name, tutor_group and another (Results) with fields pupil_enrolment_number, teaching_set, effort_grade and achievement_grade. The tables are linked with a one to many relationship on pupil_enrolment_number (each pupil has more than one teaching set).
I then have a query which produces a list from the Results table, but looks up the name from the Pupil table. This query then appears as a subform, the main form having a combo box that selects the data based on one of the fields in the query (class).
The problem is that the first record in the query gets the value of class overwritten by the value typed into the combo box on the main form.
I have a work round by having a dummy record as the first record, but there must be a more elegant solution.