Report prob

Z

zufie

Here is my code. When I delete the HSFT data the AllPrograms Report
those not return any values. That is, this query for which I provide
the code below returns the values for this report. Thanks, John

SELECT qryTotalAge.*, qryTotalRace.*, qryTotalEmploy.*,
qryTotalEducation.*, qryTotalIncome.*, qryTotAgeOthNR.*,
qryTotEducOthNR.*, qryHSFTageEdu.[SumOfQ1 <=12 Years], qryHSFTageEdu.
[SumOfQ1 13 Years], qryHSFTageEdu.[SumOfQ1 14 Years] AS [SumOfQ1 14
Years HSFTageEdu], qryHSFTageEdu.[SumOfQ1 >=15 years], qryHSFTageEdu.
[SumOfQ1 Other], qryHSFTageEdu.[SumOfQ1 No Response], qryHSFTageEdu.
[SumOfQ2 <=12 Years], qryHSFTageEdu.[SumOfQ2 13 Years], qryHSFTageEdu.
[SumOfQ2 14 Years] AS [SumOfQ2 14 Years HSFTageEdu], qryHSFTageEdu.
[SumOfQ2 >=15 years], qryHSFTageEdu.[SumOfQ2 Other], qryHSFTageEdu.
[SumOfQ2 No Response], qryHSFTageEdu.[SumOfQ3 <=12 Years],
qryHSFTageEdu.[SumOfQ3 13 Years], qryHSFTageEdu.[SumOfQ3 14 Years] AS
[SumOfQ3 14 Years HSFTageEdu], qryHSFTageEdu.[SumOfQ3 >=15 years],
qryHSFTageEdu.[SumOfQ3 Other1], qryHSFTageEdu.[SumOfQ3 No Response],
qryHSFTageEdu.[SumOfQ4 <=12 Years], qryHSFTageEdu.[SumOfQ4 13 Years],
qryHSFTageEdu.[SumOfQ4 14 Years] AS [SumOfQ4 14 Years HSFTageEdu],
qryHSFTageEdu.[SumOfQ4 >=15 years], qryHSFTageEdu.[SumOfQ4 Other1],
qryHSFTageEdu.[SumOfQ4 No Response], qryHSFTageEdu.[SumOfQ1 <=8th
Grade], qryHeartSmartForTeens.[SumOfQ1 <=8th Grade] AS [Q1 <=8th
Grade1], qryHSFTageEdu.[SumOfQ1 9th-12th Grade], qryHeartSmartForTeens.
[SumOfQ1 9th-12th Grade] AS [Q1 9th-12th Grade1], qryHSFTageEdu.
[SumOfQ1 Other1], qryHSFTageEdu.[SumOfQ1 No Response1], qryHSFTageEdu.
[SumOfQ2 <=8th Grade], qryHeartSmartForTeens.[SumOfQ2 <=8th Grade] AS
[Q2 <=8th Grade1], qryHSFTageEdu.[SumOfQ2 9th-12th Grade],
qryHeartSmartForTeens.[SumOfQ2 9th-12th Grade] AS [Q2 9th-12th
Grade1], qryHSFTageEdu.[SumOfQ2 Other1], qryHSFTageEdu.[SumOfQ2 No
Response1], qryHSFTageEdu.[SumOfQ3 <=8th Grade], qryHeartSmartForTeens.
[SumOfQ3 <=8th Grade] AS [Q3 <=8th Grade1], qryHSFTageEdu.[SumOfQ3
9th-12th Grade], qryHeartSmartForTeens.[SumOfQ3 9th-12th Grade] AS [Q3
9th-12th Grade1], qryHSFTageEdu.[SumOfQ3 Other], qryHSFTageEdu.
[SumOfQ3 No Response1], qryHSFTageEdu.[SumOfQ4 <=8th Grade],
qryHeartSmartForTeens.[SumOfQ4 <=8th Grade] AS [Q4 <=8th Grade1],
qryHSFTageEdu.[SumOfQ4 9th-12th Grade], qryHeartSmartForTeens.[SumOfQ4
9th-12th Grade] AS [Q4 9th-12th Grade1], qryHSFTageEdu.[SumOfQ4 No
Response1], qryTotalEthnicity.*
FROM qryTotalAge, qryTotalEmploy, qryTotalIncome, qryTotalRace,
qryTotAgeOthNR, qryTotEducOthNR, qryHSFTageEdu, qryTotalEthnicity,
qryTotalEducation, qryHeartSmartForTeens;
 
J

John W. Vinson

Here is my code. When I delete the HSFT data the AllPrograms Report
those not return any values. That is, this query for which I provide
the code below returns the values for this report. Thanks, John

Do you have a question, John?

As written your query has *no joins at all*; the WHERE clause (defining the
source of the data) is

FROM qryTotalAge, qryTotalEmploy, qryTotalIncome, qryTotalRace,
qryTotAgeOthNR, qryTotEducOthNR, qryHSFTageEdu, qryTotalEthnicity,
qryTotalEducation, qryHeartSmartForTeens;

This is called a "Cartesian Join"; you have ten queries, each of which might
have multiple records (in principle, I don't know what these queries are).
Access will match *every single record* in each of these queries with *every
single record* in each of the other queries, in all possible combinations; if
you had ten records in each query, you would end up with 10,000,000,000 rows
in the result - certainly NOT what you want.

Do you mean that you're deleting *data* from the HSFT table? or deleting the
HSFT query from this query? or what?

Please don't make the assumption that any of the volunteers here can see your
table structures, know how the tables are related, know what's in qryTotalAge
or anything else: we can only see what you post.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
J

John W. Vinson

Yes, I mean that I am deleting *data* from the HSFT table?

Could you please post an explanation of the problem you are encountering and
indicate what help you need?

So far you've said "Report prob" and listed a largish but very incomplete SQL
query. It calls multiple other queries (which you have not posted) referencing
one or more tables (which you have not described).

We're just people here, volunteers donating our time. Nobody here can see your
computer, nor do we know anything you don't post. I'd love to help, but given
what you've posted, there's nothing useful that I can contribute!
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Z

zufie

Could you please post an explanation of the problem you are encountering and
indicate what help you need?

So far you've said "Report prob" and listed a largish but very incompleteSQL
query. It calls multiple other queries (which you have not posted) referencing
one or more tables (which you have not described).

We're just people here, volunteers donating our time. Nobody here can seeyour
computer, nor do we know anything you don't post. I'd love to help, but given
what you've posted, there's nothing useful that I can contribute!
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com


When I delete HSFT data from the tbl HSFT age, Tbl Race, Tbl
Ethnicity, Tbl HSFT Education, Tbl Heart Smart for Teens, Tbl Main ID,
then run the rptTotalAllPrograms no values are returned on this
report.
Tbl Main ID is the only table listed above that has a primary key and
that is ID (AutoNumber).

I thought, perhaps it was due to qryTotalAll, which is the record
source behind the ptTotalAllPrograms. The SQL code I show in my
original post and list below is the code to qryTotalAll.

Here is the code to qryTotalAll:
SELECT qryTotalAge.*, qryTotalRace.*, qryTotalEmploy.*,
qryTotalEducation.*, qryTotalIncome.*, qryTotAgeOthNR.*,
qryTotEducOthNR.*, qryHSFTageEdu.[SumOfQ1 <=12 Years], qryHSFTageEdu.
[SumOfQ1 13 Years], qryHSFTageEdu.[SumOfQ1 14 Years] AS [SumOfQ1 14
Years HSFTageEdu], qryHSFTageEdu.[SumOfQ1 >=15 years], qryHSFTageEdu.
[SumOfQ1 Other], qryHSFTageEdu.[SumOfQ1 No Response], qryHSFTageEdu.
[SumOfQ2 <=12 Years], qryHSFTageEdu.[SumOfQ2 13 Years], qryHSFTageEdu.
[SumOfQ2 14 Years] AS [SumOfQ2 14 Years HSFTageEdu], qryHSFTageEdu.
[SumOfQ2 >=15 years], qryHSFTageEdu.[SumOfQ2 Other], qryHSFTageEdu.
[SumOfQ2 No Response], qryHSFTageEdu.[SumOfQ3 <=12 Years],
qryHSFTageEdu.[SumOfQ3 13 Years], qryHSFTageEdu.[SumOfQ3 14 Years] AS
[SumOfQ3 14 Years HSFTageEdu], qryHSFTageEdu.[SumOfQ3 >=15 years],
qryHSFTageEdu.[SumOfQ3 Other1], qryHSFTageEdu.[SumOfQ3 No Response],
qryHSFTageEdu.[SumOfQ4 <=12 Years], qryHSFTageEdu.[SumOfQ4 13 Years],
qryHSFTageEdu.[SumOfQ4 14 Years] AS [SumOfQ4 14 Years HSFTageEdu],
qryHSFTageEdu.[SumOfQ4 >=15 years], qryHSFTageEdu.[SumOfQ4 Other1],
qryHSFTageEdu.[SumOfQ4 No Response], qryHSFTageEdu.[SumOfQ1 <=8th
Grade], qryHeartSmartForTeens.[SumOfQ1 <=8th Grade] AS [Q1 <=8th
Grade1], qryHSFTageEdu.[SumOfQ1 9th-12th Grade], qryHeartSmartForTeens.
[SumOfQ1 9th-12th Grade] AS [Q1 9th-12th Grade1], qryHSFTageEdu.
[SumOfQ1 Other1], qryHSFTageEdu.[SumOfQ1 No Response1], qryHSFTageEdu.
[SumOfQ2 <=8th Grade], qryHeartSmartForTeens.[SumOfQ2 <=8th Grade] AS
[Q2 <=8th Grade1], qryHSFTageEdu.[SumOfQ2 9th-12th Grade],
qryHeartSmartForTeens.[SumOfQ2 9th-12th Grade] AS [Q2 9th-12th
Grade1], qryHSFTageEdu.[SumOfQ2 Other1], qryHSFTageEdu.[SumOfQ2 No
Response1], qryHSFTageEdu.[SumOfQ3 <=8th Grade], qryHeartSmartForTeens.
[SumOfQ3 <=8th Grade] AS [Q3 <=8th Grade1], qryHSFTageEdu.[SumOfQ3
9th-12th Grade], qryHeartSmartForTeens.[SumOfQ3 9th-12th Grade] AS [Q3
9th-12th Grade1], qryHSFTageEdu.[SumOfQ3 Other], qryHSFTageEdu.
[SumOfQ3 No Response1], qryHSFTageEdu.[SumOfQ4 <=8th Grade],
qryHeartSmartForTeens.[SumOfQ4 <=8th Grade] AS [Q4 <=8th Grade1],
qryHSFTageEdu.[SumOfQ4 9th-12th Grade], qryHeartSmartForTeens.[SumOfQ4
9th-12th Grade] AS [Q4 9th-12th Grade1], qryHSFTageEdu.[SumOfQ4 No
Response1], qryTotalEthnicity.*
FROM qryTotalAge, qryTotalEmploy, qryTotalIncome, qryTotalRace,
qryTotAgeOthNR, qryTotEducOthNR, qryHSFTageEdu, qryTotalEthnicity,
qryTotalEducation, qryHeartSmartForTeens;

qryTotalAll is composed of ten queries. Eight of these ten queries
include all of their fields within qryTotalAll. Two of the ten queries
(qryHSFTageEdu & qryHeartSmartForTeens), include only some of their
fields within qryTotalAll. Specifically, qryHSFTageEdu includes 39 of
its 40 fields within the qryTotalAll, while qryHeartSmartForTeens
includes 8 of its 145 fields within the qryTotalAll.

Here is the code for each of the ten queries:
qryTotalAge--
SELECT Sum([Tbl Age].[Q1 8 - 9 Years]) AS [SumOfQ1 8 - 9 Years],
Sum([Tbl Age].[Q1 10 - 11 Years]) AS [SumOfQ1 10 - 11 Years], Sum([Tbl
Age].[Q1 12 - 13 Years]) AS [SumOfQ1 12 - 13 Years], Sum([Tbl Age].[Q1
14 Years]) AS [SumOfQ1 14 Years], Sum([Tbl Age].[Q1 > 14 Years]) AS
[SumOfQ1 > 14 Years], Sum([Tbl Age].[Q1 Other]) AS [SumOfQ1 Other],
Sum([Tbl Age].[Q1 No Response]) AS [SumOfQ1 No Response], Sum([Tbl
Age].[Q1 18 - 24 Years]) AS [SumOfQ1 18 - 24 Years], Sum([Tbl Age].[Q1
25 - 44 Years]) AS [SumOfQ1 25 - 44 Years], Sum([Tbl Age].[Q1 45 - 64
Years]) AS [SumOfQ1 45 - 64 Years], Sum([Tbl Age].[Q1 > = 65 Years])
AS [SumOfQ1 > = 65 Years], Sum([Tbl Age].[Q2 8 - 9 Years]) AS [SumOfQ2
8 - 9 Years], Sum([Tbl Age].[Q2 10 - 11 Years]) AS [SumOfQ2 10 - 11
Years], Sum([Tbl Age].[Q2 12 - 13 Years]) AS [SumOfQ2 12 - 13 Years],
Sum([Tbl Age].[Q2 14 Years]) AS [SumOfQ2 14 Years], Sum([Tbl Age].[Q2
14 Years]) AS [SumOfQ2 > 14 Years], Sum([Tbl Age].[Q2 Other]) AS
[SumOfQ2 Other], Sum([Tbl Age].[Q2 No Response]) AS [SumOfQ2 No
Response], Sum([Tbl Age].[Q2 18 - 24 Years]) AS [SumOfQ2 18 - 24
Years], Sum([Tbl Age].[Q2 25 - 44 Years]) AS [SumOfQ2 25 - 44 Years],
Sum([Tbl Age].[Q2 45 - 64 Years]) AS [SumOfQ2 45 - 64 Years], Sum([Tbl
Age].[Q2 > = 65 Years]) AS [SumOfQ2 > = 65 Years], Sum([Tbl Age].[Q3 8
- 9 Years]) AS [SumOfQ3 8 - 9 Years], Sum([Tbl Age].[Q3 10 - 11
Years]) AS [SumOfQ3 10 - 11 Years], Sum([Tbl Age].[Q3 12 - 13 Years])
AS [SumOfQ3 12 - 13 Years], Sum([Tbl Age].[Q3 14 Years]) AS [SumOfQ3
14 Years], Sum([Tbl Age].[Q3 > 14 Years]) AS [SumOfQ3 > 14 Years],
Sum([Tbl Age].[Q3 Other]) AS [SumOfQ3 Other], Sum([Tbl Age].[Q3 No
Response]) AS [SumOfQ3 No Response], Sum([Tbl Age].[Q3 18 - 24 Years])
AS [SumOfQ3 18 - 24 Years], Sum([Tbl Age].[Q3 25 - 44 Years]) AS
[SumOfQ3 25 - 44 Years], Sum([Tbl Age].[Q3 45 - 64 Years]) AS [SumOfQ3
45 - 64 Years], Sum([Tbl Age].[Q3 > = 65 Years]) AS [SumOfQ3 > = 65
Years], Sum([Tbl Age].[Q4 8 - 9 Years]) AS [SumOfQ4 8 - 9 Years],
Sum([Tbl Age].[Q4 10 - 11 Years]) AS [SumOfQ4 10 - 11 Years], Sum([Tbl
Age].[Q4 12 - 13 Years]) AS [SumOfQ4 12 - 13 Years], Sum([Tbl Age].[Q4
14 Years]) AS [SumOfQ4 14 Years], Sum([Tbl Age].[Q4 > 14 Years]) AS
[SumOfQ4 > 14 Years], Sum([Tbl Age].[Q4 Other]) AS [SumOfQ4 Other],
Sum([Tbl Age].[Q4 No Response]) AS [SumOfQ4 No Response], Sum([Tbl
Age].[Q4 18 - 24 Years]) AS [SumOfQ4 18 - 24 Years], Sum([Tbl Age].[Q4
25 - 44 Years]) AS [SumOfQ4 25 - 44 Years], Sum([Tbl Age].[Q4 45 - 64
Years]) AS [SumOfQ4 45 - 64 Years], Sum([Tbl Age].[Q4 > = 65 Years])
AS [SumOfQ4 > = 65 Years]
FROM [Tbl Age];


qryTotalRace--
SELECT Sum([Tbl Race].[Q1 Asian]) AS [SumOfQ1 Asian], Sum([Tbl Race].
[Q1 American Indian/Alaska Native]) AS [SumOfQ1 American Indian/Alaska
Native], Sum([Tbl Race].[Q1 Black/African American]) AS [SumOfQ1 Black/
African American], Sum([Tbl Race].[Q1 Native Hawaiian/Pacific
Islander]) AS [SumOfQ1 Native Hawaiian/Pacific Islander], Sum([Tbl
Race].[Q1 White]) AS [SumOfQ1 White], Sum([Tbl Race].[Q1 Other]) AS
[SumOfQ1 Other], Sum([Tbl Race].[Q1 No Response]) AS [SumOfQ1 No
Response], Sum([Tbl Race].[Q2 Asian]) AS [SumOfQ2 Asian], Sum([Tbl
Race].[Q2 American Indian/Alaska Native]) AS [SumOfQ2 American Indian/
Alaska Native], Sum([Tbl Race].[Q2 Black/African American]) AS
[SumOfQ2 Black/African American], Sum([Tbl Race].[Q2 Native Hawaiian/
Pacific Islander]) AS [SumOfQ2 Native Hawaiian/Pacific Islander],
Sum([Tbl Race].[Q2 White]) AS [SumOfQ2 White], Sum([Tbl Race].[Q2
Other]) AS [SumOfQ2 Other], Sum([Tbl Race].[Q2 No Response]) AS
[SumOfQ2 No Response], Sum([Tbl Race].[Q3 Asian]) AS [SumOfQ3 Asian],
Sum([Tbl Race].[Q3 American Indian/Alaska Native]) AS [SumOfQ3
American Indian/Alaska Native], Sum([Tbl Race].[Q3 Black/African
American]) AS [SumOfQ3 Black/African American], Sum([Tbl Race].[Q3
Native Hawaiian/Pacific Islander]) AS [SumOfQ3 Native Hawaiian/Pacific
Islander], Sum([Tbl Race].[Q3 White]) AS [SumOfQ3 White], Sum([Tbl
Race].[Q3 Other]) AS [SumOfQ3 Other], Sum([Tbl Race].[Q3 No Response])
AS [SumOfQ3 No Response], Sum([Tbl Race].[Q4 Asian]) AS [SumOfQ4
Asian], Sum([Tbl Race].[Q4 American Indian/Alaska Native]) AS [SumOfQ4
American Indian/Alaska Native], Sum([Tbl Race].[Q4 Black/African
American]) AS [SumOfQ4 Black/African American], Sum([Tbl Race].[Q4
Native Hawaiian/Pacific Islander]) AS [SumOfQ4 Native Hawaiian/Pacific
Islander], Sum([Tbl Race].[Q4 White]) AS [SumOfQ4 White], Sum([Tbl
Race].[Q4 Other]) AS [SumOfQ4 Other], Sum([Tbl Race].[Q4 No Response])
AS [SumOfQ4 No Response]
FROM [Tbl Race];


qryTotalEmploy--
SELECT Sum([Tbl Employment].[Q1 Employed]) AS [SumOfQ1 Employed],
Sum([Tbl Employment].[Q1 Out of Work]) AS [SumOfQ1 Out of Work],
Sum([Tbl Employment].[Q1 Homemaker/Student]) AS [SumOfQ1 Homemaker/
Student], Sum([Tbl Employment].[Q1 Retired/Unable to Work]) AS
[SumOfQ1 Retired/Unable to Work], Sum([Tbl Employment].[Q1 Other]) AS
[SumOfQ1 Other], Sum([Tbl Employment].[Q1 No Response]) AS [SumOfQ1 No
Response], Sum([Tbl Employment].[Q2 Employed]) AS [SumOfQ2 Employed],
Sum([Tbl Employment].[Q2 Out of Work]) AS [SumOfQ2 Out of Work],
Sum([Tbl Employment].[Q2 Homemaker/Student]) AS [SumOfQ2 Homemaker/
Student], Sum([Tbl Employment].[Q2 Retired/Unable to Work]) AS
[SumOfQ2 Retired/Unable to Work], Sum([Tbl Employment].[Q2 Other]) AS
[SumOfQ2 Other], Sum([Tbl Employment].[Q2 No Response]) AS [SumOfQ2 No
Response], Sum([Tbl Employment].[Q3 Employed]) AS [SumOfQ3 Employed],
Sum([Tbl Employment].[Q3 Out of Work]) AS [SumOfQ3 Out of Work],
Sum([Tbl Employment].[Q3 Homemaker/Student]) AS [SumOfQ3 Homemaker/
Student], Sum([Tbl Employment].[Q3 Retired/Unable to Work]) AS
[SumOfQ3 Retired/Unable to Work], Sum([Tbl Employment].[Q3 Other]) AS
[SumOfQ3 Other], Sum([Tbl Employment].[Q3 No Response]) AS [SumOfQ3 No
Response], Sum([Tbl Employment].[Q4 Employed]) AS [SumOfQ4 Employed],
Sum([Tbl Employment].[Q4 Out of Work]) AS [SumOfQ4 Out of Work],
Sum([Tbl Employment].[Q4 Homemaker/Student]) AS [SumOfQ4 Homemaker/
Student], Sum([Tbl Employment].[Q4 Retired/Unable to Work]) AS
[SumOfQ4 Retired/Unable to Work], Sum([Tbl Employment].[Q4 Other]) AS
[SumOfQ4 Other], Sum([Tbl Employment].[Q4 No Response]) AS [SumOfQ4 No
Response]
FROM [Tbl Employment];


qryTotalEducation--
SELECT Sum([Tbl Education].[Q1 < = High School]) AS [SumOfQ1 < = High
School], Sum([Tbl Education].[Q1 High School Graduate]) AS [SumOfQ1
High School Graduate], Sum([Tbl Education].[Q1 Some College/Trade/
Vocational School]) AS [SumOfQ1 Some College/Trade/Vocational School],
Sum([Tbl Education].[Q1 Trade or Vocational School Graduate]) AS
[SumOfQ1 Trade or Vocational School Graduate], Sum([Tbl Education].[Q1
College Graduate]) AS [SumOfQ1 College Graduate], Sum([Tbl Education].
[Q1 Graduate Degrees]) AS [SumOfQ1 Graduate Degrees], Sum([Tbl
Education].[Q1 Other]) AS [SumOfQ1 Other], Sum([Tbl Education].[Q1 No
Response]) AS [SumOfQ1 No Response], Sum([Tbl Education].[Q2 < = High
School]) AS [SumOfQ2 < = High School], Sum([Tbl Education].[Q2 High
School Graduate]) AS [SumOfQ2 High School Graduate], Sum([Tbl
Education].[Q2 Some College/Trade/Vocational School]) AS [SumOfQ2 Some
College/Trade/Vocational School], Sum([Tbl Education].[Q2 Trade or
Vocational School Graduate]) AS [SumOfQ2 Trade or Vocational School
Graduate], Sum([Tbl Education].[Q2 College Graduate]) AS [SumOfQ2
College Graduate], Sum([Tbl Education].[Q2 Graduate Degrees]) AS
[SumOfQ2 Graduate Degrees], Sum([Tbl Education].[Q2 Other]) AS
[SumOfQ2 Other], Sum([Tbl Education].[Q2 No Response]) AS [SumOfQ2 No
Response], Sum([Tbl Education].[Q3 < = High School]) AS [SumOfQ3 < =
High School], Sum([Tbl Education].[Q3 High School Graduate]) AS
[SumOfQ3 High School Graduate], Sum([Tbl Education].[Q3 Some College/
Trade/Vocational School]) AS [SumOfQ3 Some College/Trade/Vocational
School], Sum([Tbl Education].[Q3 Trade or Vocational School Graduate])
AS [SumOfQ3 Trade or Vocational School Graduate], Sum([Tbl Education].
[Q3 College Graduate]) AS [SumOfQ3 College Graduate], Sum([Tbl
Education].[Q3 Graduate Degrees]) AS [SumOfQ3 Graduate Degrees],
Sum([Tbl Education].[Q3 Other]) AS [SumOfQ3 Other], Sum([Tbl
Education].[Q3 No Response]) AS [SumOfQ3 No Response], Sum([Tbl
Education].[Q4 < = High School]) AS [SumOfQ4 < = High School],
Sum([Tbl Education].[Q4 High School Graduate]) AS [SumOfQ4 High School
Graduate], Sum([Tbl Education].[Q4 Some College/Trade/Vocational
School]) AS [SumOfQ4 Some College/Trade/Vocational School], Sum([Tbl
Education].[Q4 Trade or Vocational School Graduate]) AS [SumOfQ4 Trade
or Vocational School Graduate], Sum([Tbl Education].[Q4 College
Graduate]) AS [SumOfQ4 College Graduate], Sum([Tbl Education].[Q4
Graduate Degrees]) AS [SumOfQ4 Graduate Degrees], Sum([Tbl Education].
[Q4 Other]) AS [SumOfQ4 Other], Sum([Tbl Education].[Q4 No Response])
AS [SumOfQ4 No Response]
FROM [Tbl Education];


qryTotalIncome--
SELECT Sum([Tbl Income].[Q1 < = $15,000]) AS [SumOfQ1 < = $15,000],
Sum([Tbl Income].[Q1 $15,000 - $35,000]) AS [SumOfQ1 $15,000 -
$35,000], Sum([Tbl Income].[Q1 $35,000 - $50,000]) AS [SumOfQ1 $35,000
- $50,000], Sum([Tbl Income].[Q1 $50,000 - $75,000]) AS [SumOfQ1
$50,000 - $75,000], Sum([Tbl Income].[Q1 > = $75,000]) AS [SumOfQ1 > =
$75,000], Sum([Tbl Income].[Q1 Other]) AS [SumOfQ1 Other], Sum([Tbl
Income].[Q1 No Response]) AS [SumOfQ1 No Response], Sum([Tbl Income].
[Q2 < = $15,000]) AS [SumOfQ2 < = $15,000], Sum([Tbl Income].[Q2
$15,000 - $35,000]) AS [SumOfQ2 $15,000 - $35,000], Sum([Tbl Income].
[Q2 $35,000 - $50,000]) AS [SumOfQ2 $35,000 - $50,000], Sum([Tbl
Income].[Q2 $50,000 - $75,000]) AS [SumOfQ2 $50,000 - $75,000],
Sum([Tbl Income].[Q2 > = $75,000]) AS [SumOfQ2 > = $75,000], Sum([Tbl
Income].[Q2 Other]) AS [SumOfQ2 Other], Sum([Tbl Income].[Q2 No
Response]) AS [SumOfQ2 No Response], Sum([Tbl Income].[Q3 < =
$15,000]) AS [SumOfQ3 < = $15,000], Sum([Tbl Income].[Q3 $15,000 -
$35,000]) AS [SumOfQ3 $15,000 - $35,000], Sum([Tbl Income].[Q3 $35,000
- $50,000]) AS [SumOfQ3 $35,000 - $50,000], Sum([Tbl Income].[Q3
$50,000 - $75,000]) AS [SumOfQ3 $50,000 - $75,000], Sum([Tbl Income].
[Q3 > = $75,000]) AS [SumOfQ3 > = $75,000], Sum([Tbl Income].[Q3
Other]) AS [SumOfQ3 Other], Sum([Tbl Income].[Q3 No Response]) AS
[SumOfQ3 No Response], Sum([Tbl Income].[Q4 < = $15,000]) AS [SumOfQ4
< = $15,000], Sum([Tbl Income].[Q4 $15,000 - $35,000]) AS [SumOfQ4
$15,000 - $35,000], Sum([Tbl Income].[Q4 $35,000 - $50,000]) AS
[SumOfQ4 $35,000 - $50,000], Sum([Tbl Income].[Q4 $50,000 - $75,000])
AS [SumOfQ4 $50,000 - $75,000], Sum([Tbl Income].[Q4 > = $75,000]) AS
[SumOfQ4 > = $75,000], Sum([Tbl Income].[Q4 Other]) AS [SumOfQ4
Other], Sum([Tbl Income].[Q4 No Response]) AS [SumOfQ4 No Response]
FROM [Tbl Income];


qryTotAgeOthNR--
SELECT qryHSFTageEdu![SumOfQ1 Other]+qryTotalAge![SumOfQ1 Other] AS
Q1TotAgeOth, qryHSFTageEdu![SumOfQ2 Other]+qryTotalAge![SumOfQ2 Other]
AS Q2TotAgeOth, qryHSFTageEdu![SumOfQ3 Other1]+qryTotalAge![SumOfQ3
Other] AS Q3TotAgeOth, qryHSFTageEdu![SumOfQ4 Other]+qryTotalAge!
[SumOfQ4 Other] AS Q4TotAgeOth, qryHSFTageEdu![SumOfQ1 No Response]
+qryTotalAge![SumOfQ1 No Response] AS Q1TotAgeNoRes, qryHSFTageEdu!
[SumOfQ2 No Response]+qryTotalAge![SumOfQ2 No Response] AS
Q2TotAgeNoRes, qryHSFTageEdu![SumOfQ3 No Response]+qryTotalAge!
[SumOfQ3 No Response] AS Q3TotAgeNoRes, qryHSFTageEdu![SumOfQ4 No
Response]+qryTotalAge![SumOfQ4 No Response] AS Q4TotAgeNoRes
FROM qryHSFTageEdu, qryTotalAge;


qryTotEducOthNR--
SELECT qryHSFTageEdu![SumOfQ1 Other1]+qryTotalEducation![SumOfQ1
Other] AS Q1TotEducOth, qryHSFTageEdu![SumOfQ2
Other1]+qryTotalEducation![SumOfQ2 Other] AS Q2TotEducOth,
[qryHSFTageEdu]![SumOfQ3 Other]+[qryTotalEducation]![SumOfQ3 Other] AS
Q3TotEducOth, [qryHSFTageEdu]![SumOfQ4 Other1]+[qryTotalEducation]!
[SumOfQ4 Other] AS Q4TotEducOth, qryHSFTageEdu![SumOfQ1 No
Response1]+qryTotalEducation![SumOfQ1 No Response] AS Q1TotEducNoRes,
qryHSFTageEdu![SumOfQ2 No Response1]+qryTotalEducation![SumOfQ2 No
Response] AS Q2TotEducNoRes, qryHSFTageEdu![SumOfQ3 No
Response1]+qryTotalEducation![SumOfQ3 No Response] AS Q3TotEducNoRes,
qryHSFTageEdu![SumOfQ4 No Response1]+qryTotalEducation![SumOfQ4 No
Response] AS Q4TotEducNoRes
FROM qryHSFTageEdu, qryTotalEducation;


qryHSFTageEdu--
SELECT Sum([Tbl HSFT age].[Q1 <=12 Years]) AS [SumOfQ1 <=12 Years],
Sum([Tbl HSFT age].[Q1 13 Years]) AS [SumOfQ1 13 Years], Sum([Tbl HSFT
age].[Q1 14 Years]) AS [SumOfQ1 14 Years], Sum([Tbl HSFT age].[Q1 >=15
years]) AS [SumOfQ1 >=15 years], Sum([Tbl HSFT age].[Q1 Other]) AS
[SumOfQ1 Other], Sum([Tbl HSFT age].[Q1 No Response]) AS [SumOfQ1 No
Response], Sum([Tbl HSFT age].[Q2 <=12 Years]) AS [SumOfQ2 <=12
Years], Sum([Tbl HSFT age].[Q2 13 Years]) AS [SumOfQ2 13 Years],
Sum([Tbl HSFT age].[Q2 14 Years]) AS [SumOfQ2 14 Years], Sum([Tbl HSFT
age].[Q2 >=15 years]) AS [SumOfQ2 >=15 years], Sum([Tbl HSFT age].[Q2
Other]) AS [SumOfQ2 Other], Sum([Tbl HSFT age].[Q2 No Response]) AS
[SumOfQ2 No Response], Sum([Tbl HSFT age].[Q3 <=12 Years]) AS [SumOfQ3
<=12 Years], Sum([Tbl HSFT age].[Q3 13 Years]) AS [SumOfQ3 13 Years],
Sum([Tbl HSFT age].[Q3 14 Years]) AS [SumOfQ3 14 Years], Sum([Tbl HSFT
age].[Q3 >=15 years]) AS [SumOfQ3 >=15 years], Sum([Tbl HSFT age].[Q3
Other]) AS [SumOfQ3 Other1], Sum([Tbl HSFT age].[Q3 No Response]) AS
[SumOfQ3 No Response], Sum([Tbl HSFT age].[Q4 <=12 Years]) AS [SumOfQ4
<=12 Years], Sum([Tbl HSFT age].[Q4 13 Years]) AS [SumOfQ4 13 Years],
Sum([Tbl HSFT age].[Q4 14 Years]) AS [SumOfQ4 14 Years], Sum([Tbl HSFT
age].[Q4 >=15 years]) AS [SumOfQ4 >=15 years], Sum([Tbl HSFT age].[Q4
Other]) AS [SumOfQ4 Other], Sum([Tbl HSFT age].[Q4 No Response]) AS
[SumOfQ4 No Response], Sum([Tbl HSFT Education].[Q1 <=8th Grade]) AS
[SumOfQ1 <=8th Grade], Sum([Tbl HSFT Education].[Q1 9th-12th Grade])
AS [SumOfQ1 9th-12th Grade], Sum([Tbl HSFT Education].[Q1 Other]) AS
[SumOfQ1 Other1], Sum([Tbl HSFT Education].[Q1 No Response]) AS
[SumOfQ1 No Response1], Sum([Tbl HSFT Education].[Q2 <=8th Grade]) AS
[SumOfQ2 <=8th Grade], Sum([Tbl HSFT Education].[Q2 9th-12th Grade])
AS [SumOfQ2 9th-12th Grade], Sum([Tbl HSFT Education].[Q2 Other]) AS
[SumOfQ2 Other1], Sum([Tbl HSFT Education].[Q2 No Response]) AS
[SumOfQ2 No Response1], Sum([Tbl HSFT Education].[Q3 <=8th Grade]) AS
[SumOfQ3 <=8th Grade], Sum([Tbl HSFT Education].[Q3 9th-12th Grade])
AS [SumOfQ3 9th-12th Grade], Sum([Tbl HSFT Education].[Q3 Other]) AS
[SumOfQ3 Other], Sum([Tbl HSFT Education].[Q3 No Response]) AS
[SumOfQ3 No Response1], Sum([Tbl HSFT Education].[Q4 <=8th Grade]) AS
[SumOfQ4 <=8th Grade], Sum([Tbl HSFT Education].[Q4 9th-12th Grade])
AS [SumOfQ4 9th-12th Grade], Sum([Tbl HSFT Education].[Q4 Other]) AS
[SumOfQ4 Other1], Sum([Tbl HSFT Education].[Q4 No Response]) AS
[SumOfQ4 No Response1]
FROM [Tbl HSFT age] RIGHT JOIN [Tbl HSFT Education] ON [Tbl HSFT
age].ID = [Tbl HSFT Education].ID;


qryHeartSmartForTeens--
SELECT [Tbl Main ID].[Program Name], Sum([Tbl HSFT age].[Q1 <=12
Years]) AS [SumOfQ1 <=12 Years], Sum([Tbl HSFT age].[Q1 13 Years]) AS
[SumOfQ1 13 Years], Sum([Tbl HSFT age].[Q1 14 Years]) AS [SumOfQ1 14
Years], Sum([Tbl HSFT age].[Q1 >=15 years]) AS [SumOfQ1 >=15 years],
Sum([Tbl HSFT age].[Q1 Other]) AS [SumOfQ1 Other], Sum([Tbl HSFT age].
[Q1 No Response]) AS [SumOfQ1 No Response], Sum([Tbl HSFT age].[Q2
<=12 Years]) AS [SumOfQ2 <=12 Years], Sum([Tbl HSFT age].[Q2 13
Years]) AS [SumOfQ2 13 Years], Sum([Tbl HSFT age].[Q2 14 Years]) AS
[SumOfQ2 14 Years], Sum([Tbl HSFT age].[Q2 >=15 years]) AS [SumOfQ2
=15 years], Sum([Tbl HSFT age].[Q2 Other]) AS [SumOfQ2 Other],
Sum([Tbl HSFT age].[Q2 No Response]) AS [SumOfQ2 No Response],
Sum([Tbl HSFT age].[Q3 <=12 Years]) AS [SumOfQ3 <=12 Years], Sum([Tbl
HSFT age].[Q3 13 Years]) AS [SumOfQ3 13 Years], Sum([Tbl HSFT age].[Q3
14 Years]) AS [SumOfQ3 14 Years], Sum([Tbl HSFT age].[Q3 >=15 years])
AS [SumOfQ3 >=15 years], Sum([Tbl HSFT age].[Q3 Other]) AS [SumOfQ3
Other], Sum([Tbl HSFT age].[Q3 No Response]) AS [SumOfQ3 No Response],
Sum([Tbl HSFT age].[Q4 <=12 Years]) AS [SumOfQ4 <=12 Years], Sum([Tbl
HSFT age].[Q4 13 Years]) AS [SumOfQ4 13 Years], Sum([Tbl HSFT age].[Q4
14 Years]) AS [SumOfQ4 14 Years], Sum([Tbl HSFT age].[Q4 >=15 years])
AS [SumOfQ4 >=15 years], Sum([Tbl HSFT age].[Q4 Other]) AS [SumOfQ4
Other], Sum([Tbl HSFT age].[Q4 No Response]) AS [SumOfQ4 No Response],
Sum([Tbl HSFT Education].[Q1 <=8th Grade]) AS [SumOfQ1 <=8th Grade],
Sum([Tbl HSFT Education].[Q1 9th-12th Grade]) AS [SumOfQ1 9th-12th
Grade], Sum([Tbl HSFT Education].[Q1 Other]) AS [SumOfQ1 Other3],
Sum([Tbl HSFT Education].[Q1 No Response]) AS [SumOfQ1 No Response3],
Sum([Tbl HSFT Education].[Q2 <=8th Grade]) AS [SumOfQ2 <=8th Grade],
Sum([Tbl HSFT Education].[Q2 9th-12th Grade]) AS [SumOfQ2 9th-12th
Grade], Sum([Tbl HSFT Education].[Q2 Other]) AS [SumOfQ2 Other3],
Sum([Tbl HSFT Education].[Q2 No Response]) AS [SumOfQ2 No Response3],
Sum([Tbl HSFT Education].[Q3 <=8th Grade]) AS [SumOfQ3 <=8th Grade],
Sum([Tbl HSFT Education].[Q3 9th-12th Grade]) AS [SumOfQ3 9th-12th
Grade], Sum([Tbl HSFT Education].[Q3 Other]) AS [SumOfQ3 Other3],
Sum([Tbl HSFT Education].[Q3 No Response]) AS [SumOfQ3 No Response3],
Sum([Tbl HSFT Education].[Q4 <=8th Grade]) AS [SumOfQ4 <=8th Grade],
Sum([Tbl HSFT Education].[Q4 9th-12th Grade]) AS [SumOfQ4 9th-12th
Grade], Sum([Tbl HSFT Education].[Q4 Other]) AS [SumOfQ4 Other3],
Sum([Tbl HSFT Education].[Q4 No Response]) AS [SumOfQ4 No Response3],
Sum([Tbl Race].[Q1 Asian]) AS [SumOfQ1 Asian], Sum([Tbl Race].[Q1
American Indian/Alaska Native]) AS [SumOfQ1 American Indian/Alaska
Native], Sum([Tbl Race].[Q1 Black/African American]) AS [SumOfQ1 Black/
African American], Sum([Tbl Race].[Q1 Native Hawaiian/Pacific
Islander]) AS [SumOfQ1 Native Hawaiian/Pacific Islander], Sum([Tbl
Race].[Q1 White]) AS [SumOfQ1 White], Sum([Tbl Race].[Q1 Other]) AS
[SumOfQ1 Other1], Sum([Tbl Race].[Q1 No Response]) AS [SumOfQ1 No
Response1], Sum([Tbl Race].[Q2 Asian]) AS [SumOfQ2 Asian], Sum([Tbl
Race].[Q2 American Indian/Alaska Native]) AS [SumOfQ2 American Indian/
Alaska Native], Sum([Tbl Race].[Q2 Black/African American]) AS
[SumOfQ2 Black/African American], Sum([Tbl Race].[Q2 Native Hawaiian/
Pacific Islander]) AS [SumOfQ2 Native Hawaiian/Pacific Islander],
Sum([Tbl Race].[Q2 White]) AS [SumOfQ2 White], Sum([Tbl Race].[Q2
Other]) AS [SumOfQ2 Other1], Sum([Tbl Race].[Q2 No Response]) AS
[SumOfQ2 No Response1], Sum([Tbl Race].[Q3 Asian]) AS [SumOfQ3 Asian],
Sum([Tbl Race].[Q3 American Indian/Alaska Native]) AS [SumOfQ3
American Indian/Alaska Native], Sum([Tbl Race].[Q3 Black/African
American]) AS [SumOfQ3 Black/African American], Sum([Tbl Race].[Q3
Native Hawaiian/Pacific Islander]) AS [SumOfQ3 Native Hawaiian/Pacific
Islander], Sum([Tbl Race].[Q3 White]) AS [SumOfQ3 White], Sum([Tbl
Race].[Q3 Other]) AS [SumOfQ3 Other1], Sum([Tbl Race].[Q3 No
Response]) AS [SumOfQ3 No Response1], Sum([Tbl Race].[Q4 Asian]) AS
[SumOfQ4 Asian], Sum([Tbl Race].[Q4 American Indian/Alaska Native]) AS
[SumOfQ4 American Indian/Alaska Native], Sum([Tbl Race].[Q4 Black/
African American]) AS [SumOfQ4 Black/African American], Sum([Tbl Race].
[Q4 Native Hawaiian/Pacific Islander]) AS [SumOfQ4 Native Hawaiian/
Pacific Islander], Sum([Tbl Race].[Q4 White]) AS [SumOfQ4 White],
Sum([Tbl Race].[Q4 Other]) AS [SumOfQ4 Other1], Sum([Tbl Race].[Q4 No
Response]) AS [SumOfQ4 No Response1], Sum([Tbl Ethnicity].[Q1 Hispanic/
Latino]) AS [SumOfQ1 Hispanic/Latino], Sum([Tbl Ethnicity].[Q1 Not
Hispanic/Latino]) AS [SumOfQ1 Not Hispanic/Latino], Sum([Tbl
Ethnicity].[Q1 Other]) AS [SumOfQ1 Other4], Sum([Tbl Ethnicity].[Q1 No
Response]) AS [SumOfQ1 No Response4], Sum([Tbl Ethnicity].[Q2 Hispanic/
Latino]) AS [SumOfQ2 Hispanic/Latino], Sum([Tbl Ethnicity].[Q2 Not
Hispanic/Latino]) AS [SumOfQ2 Not Hispanic/Latino], Sum([Tbl
Ethnicity].[Q2 Other]) AS [SumOfQ2 Other4], Sum([Tbl Ethnicity].[Q2 No
Response]) AS [SumOfQ2 No Response4], Sum([Tbl Ethnicity].[Q3 Hispanic/
Latino]) AS [SumOfQ3 Hispanic/Latino], Sum([Tbl Ethnicity].[Q3 Not
Hispanic/Latino]) AS [SumOfQ3 Not Hispanic/Latino], Sum([Tbl
Ethnicity].[Q3 Other]) AS [SumOfQ3 Other4], Sum([Tbl Ethnicity].[Q3 No
Response]) AS [SumOfQ3 No Response4], Sum([Tbl Ethnicity].[Q4 Hispanic/
Latino]) AS [SumOfQ4 Hispanic/Latino], Sum([Tbl Ethnicity].[Q4 Not
Hispanic/Latino]) AS [SumOfQ4 Not Hispanic/Latino], Sum([Tbl
Ethnicity].[Q4 Other]) AS [SumOfQ4 Other4], Sum([Tbl Ethnicity].[Q4 No
Response]) AS [SumOfQ4 No Response4], Sum([Tbl Heart Smart for Teens].
[Q1 Number of Series]) AS [SumOfQ1 Number of Series], Sum([Tbl Heart
Smart for Teens].[Q1 Completing Series]) AS [SumOfQ1 Completing
Series], Sum([Tbl Heart Smart for Teens].[Q1 Completed Pre/Post Test])
AS [SumOfQ1 Completed Pre/Post Test], Sum([Tbl Heart Smart for Teens].
[Q1 Improved Knowledge]) AS [SumOfQ1 Improved Knowledge], Sum([Tbl
Heart Smart for Teens].[Q1 Completed the Pre/Post Goal Assmt]) AS
[SumOfQ1 Completed the Pre/Post Goal Assmt], Sum([Tbl Heart Smart for
Teens].[Q1 Met Physical Activity Goal]) AS [SumOfQ1 Met Physical
Activity Goal], Sum([Tbl Heart Smart for Teens].[Q1 Met Fruit Goal])
AS [SumOfQ1 Met Fruit Goal], Sum([Tbl Heart Smart for Teens].[Q1 Met
Vegetable Goal]) AS [SumOfQ1 Met Vegetable Goal], Sum([Tbl Heart Smart
for Teens].[Q1 Did not meet goals]) AS [SumOfQ1 Did not meet goals],
Sum([Tbl Heart Smart for Teens].[Q1 Follow-up with]) AS [SumOfQ1
Follow-up with], Sum([Tbl Heart Smart for Teens].[Q1 Responded Follow-
up Survey]) AS [SumOfQ1 Responded Follow-up Survey], Sum([Tbl Heart
Smart for Teens].[Q1 Maintained Physical Activity Goal]) AS [SumOfQ1
Maintained Physical Activity Goal], Sum([Tbl Heart Smart for Teens].
[Q1 Maintained Fruit Goal]) AS [SumOfQ1 Maintained Fruit Goal],
Sum([Tbl Heart Smart for Teens].[Q1 Maintained Vegatable Goal]) AS
[SumOfQ1 Maintained Vegatable Goal], Sum([Tbl Heart Smart for Teens].
[Q1 Did not Maintain Goals]) AS [SumOfQ1 Did not Maintain Goals],
Sum([Tbl Heart Smart for Teens].[Q2 Number of Series]) AS [SumOfQ2
Number of Series], Sum([Tbl Heart Smart for Teens].[Q2 Completing
Series]) AS [SumOfQ2 Completing Series], Sum([Tbl Heart Smart for
Teens].[Q2 Completed Pre/Post Test]) AS [SumOfQ2 Completed Pre/Post
Test], Sum([Tbl Heart Smart for Teens].[Q2 Improved Knowledge]) AS
[SumOfQ2 Improved Knowledge], Sum([Tbl Heart Smart for Teens].[Q2
Completed the Pre/Post Goal Assmt]) AS [SumOfQ2 Completed the Pre/Post
Goal Assmt], Sum([Tbl Heart Smart for Teens].[Q2 Met Physical Activity
Goal]) AS [SumOfQ2 Met Physical Activity Goal], Sum([Tbl Heart Smart
for Teens].[Q2 Met Fruit Goal]) AS [SumOfQ2 Met Fruit Goal], Sum([Tbl
Heart Smart for Teens].[Q2 Met Vegetable Goal]) AS [SumOfQ2 Met
Vegetable Goal], Sum([Tbl Heart Smart for Teens].[Q2 Did not meet
goals]) AS [SumOfQ2 Did not meet goals], Sum([Tbl Heart Smart for
Teens].[Q2 Follow-up with]) AS [SumOfQ2 Follow-up with], Sum([Tbl
Heart Smart for Teens].[Q2 Responded Follow-up Survey]) AS [SumOfQ2
Responded Follow-up Survey], Sum([Tbl Heart Smart for Teens].[Q2
Maintained Physical Activity Goal]) AS [SumOfQ2 Maintained Physical
Activity Goal], Sum([Tbl Heart Smart for Teens].[Q2 Maintained Fruit
Goal]) AS [SumOfQ2 Maintained Fruit Goal], Sum([Tbl Heart Smart for
Teens].[Q2 Maintained Vegatable Goal]) AS [SumOfQ2 Maintained
Vegatable Goal], Sum([Tbl Heart Smart for Teens].[Q2 Did not Maintain
Goals]) AS [SumOfQ2 Did not Maintain Goals], Sum([Tbl Heart Smart for
Teens].[Q3 Number of Series]) AS [SumOfQ3 Number of Series], Sum([Tbl
Heart Smart for Teens].[Q3 Completing Series]) AS [SumOfQ3 Completing
Series], Sum([Tbl Heart Smart for Teens].[Q3 Completed Pre/Post Test])
AS [SumOfQ3 Completed Pre/Post Test], Sum([Tbl Heart Smart for Teens].
[Q3 Improved Knowledge]) AS [SumOfQ3 Improved Knowledge], Sum([Tbl
Heart Smart for Teens].[Q3 Completed the Pre/Post Goal Assmt]) AS
[SumOfQ3 Completed the Pre/Post Goal Assmt], Sum([Tbl Heart Smart for
Teens].[Q3 Met Physical Activity Goal]) AS [SumOfQ3 Met Physical
Activity Goal], Sum([Tbl Heart Smart for Teens].[Q3 Met Fruit Goal])
AS [SumOfQ3 Met Fruit Goal], Sum([Tbl Heart Smart for Teens].[Q3 Met
Vegetable Goal]) AS [SumOfQ3 Met Vegetable Goal], Sum([Tbl Heart Smart
for Teens].[Q3 Did not meet goals]) AS [SumOfQ3 Did not meet goals],
Sum([Tbl Heart Smart for Teens].[Q3 Follow-up with]) AS [SumOfQ3
Follow-up with], Sum([Tbl Heart Smart for Teens].[Q3 Responded Follow-
up Survey]) AS [SumOfQ3 Responded Follow-up Survey], Sum([Tbl Heart
Smart for Teens].[Q3 Maintained Physical Activity Goal]) AS [SumOfQ3
Maintained Physical Activity Goal], Sum([Tbl Heart Smart for Teens].
[Q3 Maintained Fruit Goal]) AS [SumOfQ3 Maintained Fruit Goal],
Sum([Tbl Heart Smart for Teens].[Q3 Maintained Vegatable Goal]) AS
[SumOfQ3 Maintained Vegatable Goal], Sum([Tbl Heart Smart for Teens].
[Q3 Did not Maintain Goals]) AS [SumOfQ3 Did not Maintain Goals],
Sum([Tbl Heart Smart for Teens].[Q4 Number of Series]) AS [SumOfQ4
Number of Series], Sum([Tbl Heart Smart for Teens].[Q4 Completing
Series]) AS [SumOfQ4 Completing Series], Sum([Tbl Heart Smart for
Teens].[Q4 Completed Pre/Post Test]) AS [SumOfQ4 Completed Pre/Post
Test], Sum([Tbl Heart Smart for Teens].[Q4 Improved Knowledge]) AS
[SumOfQ4 Improved Knowledge], Sum([Tbl Heart Smart for Teens].[Q4
Completed the Pre/Post Goal Assmt]) AS [SumOfQ4 Completed the Pre/Post
Goal Assmt], Sum([Tbl Heart Smart for Teens].[Q4 Met Physical Activity
Goal]) AS [SumOfQ4 Met Physical Activity Goal], Sum([Tbl Heart Smart
for Teens].[Q4 Met Fruit Goal]) AS [SumOfQ4 Met Fruit Goal], Sum([Tbl
Heart Smart for Teens].[Q4 Met Vegetable Goal]) AS [SumOfQ4 Met
Vegetable Goal], Sum([Tbl Heart Smart for Teens].[Q4 Did not meet
goals]) AS [SumOfQ4 Did not meet goals], Sum([Tbl Heart Smart for
Teens].[Q4 Follow-up with]) AS [SumOfQ4 Follow-up with], Sum([Tbl
Heart Smart for Teens].[Q4 Responded Follow-up Survey]) AS [SumOfQ4
Responded Follow-up Survey], Sum([Tbl Heart Smart for Teens].[Q4
Maintained Physical Activity Goal]) AS [SumOfQ4 Maintained Physical
Activity Goal], Sum([Tbl Heart Smart for Teens].[Q4 Maintained Fruit
Goal]) AS [SumOfQ4 Maintained Fruit Goal], Sum([Tbl Heart Smart for
Teens].[Q4 Maintained Vegatable Goal]) AS [SumOfQ4 Maintained
Vegatable Goal], Sum([Tbl Heart Smart for Teens].[Q4 Did not Maintain
Goals]) AS [SumOfQ4 Did not Maintain Goals]
FROM (((([Tbl Main ID] LEFT JOIN [Tbl HSFT age] ON [Tbl Main ID].ID =
[Tbl HSFT age].ID) LEFT JOIN [Tbl HSFT Education] ON [Tbl Main ID].ID
= [Tbl HSFT Education].ID) LEFT JOIN [Tbl Ethnicity] ON [Tbl Main
ID].ID = [Tbl Ethnicity].ID) LEFT JOIN [Tbl Heart Smart for Teens] ON
[Tbl Main ID].ID = [Tbl Heart Smart for Teens].ID) LEFT JOIN [Tbl
Race] ON [Tbl Main ID].ID = [Tbl Race].ID
GROUP BY [Tbl Main ID].[Program Name]
HAVING ((([Tbl Main ID].[Program Name])="Heart Smart for Teens"));


qryTotalEthnicity--
SELECT Sum([Tbl Ethnicity].[Q1 Hispanic/Latino]) AS [SumOfQ1 Hispanic/
Latino], Sum([Tbl Ethnicity].[Q1 Not Hispanic/Latino]) AS [SumOfQ1 Not
Hispanic/Latino], Sum([Tbl Ethnicity].[Q1 Other]) AS [SumOfQ1 Other],
Sum([Tbl Ethnicity].[Q1 No Response]) AS [SumOfQ1 No Response],
Sum([Tbl Ethnicity].[Q2 Hispanic/Latino]) AS [SumOfQ2 Hispanic/
Latino], Sum([Tbl Ethnicity].[Q2 Not Hispanic/Latino]) AS [SumOfQ2 Not
Hispanic/Latino], Sum([Tbl Ethnicity].[Q2 Other]) AS [SumOfQ2 Other],
Sum([Tbl Ethnicity].[Q2 No Response]) AS [SumOfQ2 No Response],
Sum([Tbl Ethnicity].[Q3 Hispanic/Latino]) AS [SumOfQ3 Hispanic/
Latino], Sum([Tbl Ethnicity].[Q3 Not Hispanic/Latino]) AS [SumOfQ3 Not
Hispanic/Latino], Sum([Tbl Ethnicity].[Q3 Other]) AS [SumOfQ3 Other],
Sum([Tbl Ethnicity].[Q3 No Response]) AS [SumOfQ3 No Response],
Sum([Tbl Ethnicity].[Q4 Hispanic/Latino]) AS [SumOfQ4 Hispanic/
Latino], Sum([Tbl Ethnicity].[Q4 Not Hispanic/Latino]) AS [SumOfQ4 Not
Hispanic/Latino], Sum([Tbl Ethnicity].[Q4 Other]) AS [SumOfQ4 Other],
Sum([Tbl Ethnicity].[Q4 No Response]) AS [SumOfQ4 No Response]
FROM [Tbl Ethnicity];

I hope this gives you a better picture of what I am dealing with. I
realize that the qryTotalAll is way too large. I utilized aliases for
some of the fields in the qryTotalAll in order to resolve the error I
would receive regarding a “specific field name could refer to more
than one table”, when I would run the
rptTotalAllPrograms.

Thanks for any suggestions you may have--John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top