How do I filter records with same identifier to pick the first on.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using access and want a query to have a single line for a student and
pick the first parents name. The problem is each student has multiple
parents listed, so multiple records are created for a single student when I
run my query. I would then like to set up a second query to pick the next
parent and in the end I will add them all together to get a single record
with all parents from multiple queries.
 
You have to explain the storage structure you have currently. How many tables
are involved; how are they linked; how many places is one student
represented; what's the difference between a "first" and "second" parent?
Give a specific example of what you have and what you want.
 
three tables are involved a "STU" for the basic student information. A
second called "peo" for people in the child's family. and a third called
"fam" which links the student's ID number in STU to the parent ID number in
peo. The student is represented only once but the peo table can have
multiple student entries for each parent. Here each parent has it's own
unique identifier. When I run a query I want a single record with the
student ID number having on the same record at least two parent's name. This
would require combining two records into the same one and attaching it to the
student's information. I figure if I could somehow count the number of times
a student ID is used in the query that has multiple listing of a student ID
with a single parent's info. I could use queries sorting the first time, then
the second and combine everying that way. I just can't figure out how to get
something to count the number of times a student ID is used and populate a
new column for me to sort.
 
Back
Top