T
tdp
Hi. I have three tables: Tutor02-03, Tutor03-04, Tutor04-05, each with a
corresponding field called InstructionalHoursxx-xx (where xx-xx corresponds
to the same year of the table, ex. InstructionalHours02-03).
I need to find the total hours over the three years for all the tutors. Some
of the tutors appear in all three tables, some in two, and some in only one.
Each tutor is identified by a unique 4-digit ID number which is the same in
any table in which they appear. The tables are related by this field (Access
did that automatically).
I have no problem getting a calculated field called TotalHours for the
tutors that appear in all three tables, but how can I pull out the
information for those tutors who only appear in one or two tables?
For example, I tried a query to exclude those tutors who were in BOTH 02-03
AND 03-04 by having the Last_Name field from each table in the query, and
then putting the criterion <>[Tutor03-04]![Last_Name] in the
[Tutor02-03].[Last_Name] field--that didn't work (I got no records returned).
I also tried the same criterion using Not-- Not"[Tutor03-04]![Last_Name]"
(since Last_Name is a string)--that returned all the records in the 02-03
table (why??)
BTW, I only tried this after trying it with the ID numbers, figuring numbers
might make easier criteria than text strings, but it didn't work with the ID
numbers either.
I thought if I could get these queries to work (i.e. writing individual
queries for all the possibilities--tutors in three tables, tutors in two
tables, tutors in only one of the tables), that I could then write one last
query to pull them all together and have a TotalHours calculated fields (I
know to use nz since some of the fields will be null).
I hope this is understandable. Can anyone help?
corresponding field called InstructionalHoursxx-xx (where xx-xx corresponds
to the same year of the table, ex. InstructionalHours02-03).
I need to find the total hours over the three years for all the tutors. Some
of the tutors appear in all three tables, some in two, and some in only one.
Each tutor is identified by a unique 4-digit ID number which is the same in
any table in which they appear. The tables are related by this field (Access
did that automatically).
I have no problem getting a calculated field called TotalHours for the
tutors that appear in all three tables, but how can I pull out the
information for those tutors who only appear in one or two tables?
For example, I tried a query to exclude those tutors who were in BOTH 02-03
AND 03-04 by having the Last_Name field from each table in the query, and
then putting the criterion <>[Tutor03-04]![Last_Name] in the
[Tutor02-03].[Last_Name] field--that didn't work (I got no records returned).
I also tried the same criterion using Not-- Not"[Tutor03-04]![Last_Name]"
(since Last_Name is a string)--that returned all the records in the 02-03
table (why??)
BTW, I only tried this after trying it with the ID numbers, figuring numbers
might make easier criteria than text strings, but it didn't work with the ID
numbers either.
I thought if I could get these queries to work (i.e. writing individual
queries for all the possibilities--tutors in three tables, tutors in two
tables, tutors in only one of the tables), that I could then write one last
query to pull them all together and have a TotalHours calculated fields (I
know to use nz since some of the fields will be null).
I hope this is understandable. Can anyone help?