John- thanks for all your help. I have now built a completely new database
based on your suggestions. The database contains the following tables:
Students info- containing StudentID(PK) Last Name, FirstName, Grade, HR#(FK)
(in case I want to search by HR), CommentID(FK), Comments(Memo field type),
CourseStatus ID(FK), Course Status--I used the ID field as a means to create
relationships to other tables
Teachers- ID(PK) and TeacherLastName;
TeacherClasses- ID(PK) Course ID, Course, SectionID, TeacherID(FK),
TeacherName, StudentID(FK);
Classes- ID (PK), Course, SectionID, Term(some classes run quarterly,
semester, yearly, 15 classes or 17 classes);
Homerooms- HR#(PK), HR Teacher;
Comments 7 8- these are only for grades 7 and 8 -ID(PK) and CommentText;
Comments 5 6- only for grades 5 and 6-ID(PK) and CommentText;
Course Status- ID(PK) and Course Status
I have built a query with the following SQL coding:
SELECT [All Students in TMS 2004 2005].[Teacher Name], [All Students in TMS
2004 2005].[Course Title], [All Students in TMS 2004 2005].[Section ID], [All
Students in TMS 2004 2005].[Last Name], [All Students in TMS 2004
2005].[First Name], [All Students in TMS 2004 2005].[Term Code], [Students
Info].Comments, [Students Info].CourseStatus
FROM [All Students in TMS 2004 2005] INNER JOIN [Students Info] ON [All
Students in TMS 2004 2005].[Student ID] = [Students Info].[Student ID]
WHERE ((([All Students in TMS 2004 2005].[Teacher Name])=[Enter Teacher])
AND (([All Students in TMS 2004 2005].[Course Title])<>"Homeroom") AND (([All
Students in TMS 2004 2005].[Term Code])=[Enter 1st Term]) AND (([All Students
in TMS 2004 2005].Grade)=[Enter Grade])) OR ((([All Students in TMS 2004
2005].[Term Code])=[Enter 2nd Term])) OR ((([All Students in TMS 2004
2005].[Term Code])=[Enter 3rd Term])) OR ((([All Students in TMS 2004
2005].[Term Code])=[Enter Last Term]))
ORDER BY [All Students in TMS 2004 2005].[Course Title], [All Students in
TMS 2004 2005].[Section ID], [All Students in TMS 2004 2005].[Last Name];
I used the original data table with all the student information as well as a
few other fields.
I used the suggestion of a combo box for choosing Course status and have the
value stored in the student's data Course status field.
I now need help getting the comments for a particular grade to show up in
the form. I want to have the value chosen by the user to be stored in the
Comments memo field which is on the form and then be able to type in
additional information.
Thanks again for all your help. Hopefully I have provided you with enough
information.
John Vinson said:
Thanks for the information- I receive all the information about the students
in 2 separate text files- one for grades 5 and 6 and the other for grades 7
and 8.
Fine; no problem; run two append queries appending the two sets of
data into the one table.
Also, the comments used are different for the 2 different groupings.
The Comments field should be in whatever table the comment applies to.
I don't know what you mean by "groupings". Could you describe what
tables (other than [Gr 8 Student Info]) you have, how the tables are
related, and what real-life entity the table represents?
Any suggestions as to how to bring in the data into 1 table? Teachers are
different in all grades -except for the specialists.
Again... you should have a Table for each type of Entity. A Teacher is
an entity; you should have a table of Teachers, and a table of
Classes, and (almost surely) a table of TeacherClasses with a record
for each class that each teacher teaches.
John W. Vinson[MVP]