lmccroskey
Programmer
I'm trying (unsuccessfully) to put together code that will basically turn a '1-to-many' database and convert it into a flat database. Here are the basics:
A query is run that will find all of the students within a particular school district, and put them into a table. The unique identifier is the StudentID. There are tons of other fields associated with this query, but since all of the data in the Students table is 1-to-1, this will simply be an append query.
The next part is where I'm having trouble. Each student has many assignments associated to them in the Assignments table, and each assignment has many fields. For example, student 1 has 3 assignments, with each assignment being a record. I need to take each assignment and place it into the corresponding field in the flat table. For example, record1 (assignment #1)from table 'A' will be placed into the Assignment1 field in table 'B'. Then record2 (assignment #2) from table 'A' will be placed into the Assignment2 field in table 'B'.
I made a query that will look at every student ID generated from the very first query listed above, and then find the corresponding assignments in the Assignments table. So i can turn this into a recordset. However, when I movenext, I don't know how to take the data in that 2nd record and put it into the the corresponding fields in the flat table.
Any help would be GREATLY appreciated!
A query is run that will find all of the students within a particular school district, and put them into a table. The unique identifier is the StudentID. There are tons of other fields associated with this query, but since all of the data in the Students table is 1-to-1, this will simply be an append query.
The next part is where I'm having trouble. Each student has many assignments associated to them in the Assignments table, and each assignment has many fields. For example, student 1 has 3 assignments, with each assignment being a record. I need to take each assignment and place it into the corresponding field in the flat table. For example, record1 (assignment #1)from table 'A' will be placed into the Assignment1 field in table 'B'. Then record2 (assignment #2) from table 'A' will be placed into the Assignment2 field in table 'B'.
I made a query that will look at every student ID generated from the very first query listed above, and then find the corresponding assignments in the Assignments table. So i can turn this into a recordset. However, when I movenext, I don't know how to take the data in that 2nd record and put it into the the corresponding fields in the flat table.
Any help would be GREATLY appreciated!