R
Ricco
Greetings all,
I've done a search on the topic and could not find a solution to this
particular problem:
I've created a crosstab query that has successfully generated the correct
results I need; however, the column headers need to be changed and I can't
seem to write the correct expression to accomplish this. By the way, this is
for a Case Exercise right out of a beginner's tutorial book so it does not
use some of the more advanced methods this could probably be solved with.
I'll write down the exact instructions from the text.
"Create a crosstab query based on the tblContract table. use the LessonType
field values for the row headings, the LessonLength field values for the
column headings, and the count of the ContractID field values as the
summarized value, and include row sums. Save the query as
qryLessonTypeCrosstab." I'm golden up to this point.
The instructions go on to say, "Change the column heading for the row sum
column to Total Number of Lessons," I've even gotten this far successfully,
"and change the column heading for the [LessonLength] columns to Number of
30-Minute Lessons and Number of 60-Minute Lessons.
What I've tried, but to no avail are the following:
LessonLength: IIf([LessonLength]="30", "Number of 30-Minute Lessons",
"Number of 60-Minute Lessons")
IIf([LessonLength]="30", "Number of 30-Minute Lessons", "Number of 60-Minute
Lessons")
The examples I've seen in this case have been that of a yes/no or true/false
scenario. In this case, only two values are present - 30 or 60 (minutes), and
for the life of me I just can't figure out the correct expression to get it
to look at if it's "30" to generate a true statement, or if it's not "30", so
that it may generate a false statement, and wind up under their corresponding
columns accordingly.
By the way, the LessonType field lists different instruments (guitar,
violin, etc.), ContractID field is a primary key field (which lists contract
numbers), and LessonLength has a value of only 30 or 60. How far (or close)
am I from what I need to do, any tips? Thanks in advice for your time and
information.
I've done a search on the topic and could not find a solution to this
particular problem:
I've created a crosstab query that has successfully generated the correct
results I need; however, the column headers need to be changed and I can't
seem to write the correct expression to accomplish this. By the way, this is
for a Case Exercise right out of a beginner's tutorial book so it does not
use some of the more advanced methods this could probably be solved with.
I'll write down the exact instructions from the text.
"Create a crosstab query based on the tblContract table. use the LessonType
field values for the row headings, the LessonLength field values for the
column headings, and the count of the ContractID field values as the
summarized value, and include row sums. Save the query as
qryLessonTypeCrosstab." I'm golden up to this point.
The instructions go on to say, "Change the column heading for the row sum
column to Total Number of Lessons," I've even gotten this far successfully,
"and change the column heading for the [LessonLength] columns to Number of
30-Minute Lessons and Number of 60-Minute Lessons.
What I've tried, but to no avail are the following:
LessonLength: IIf([LessonLength]="30", "Number of 30-Minute Lessons",
"Number of 60-Minute Lessons")
IIf([LessonLength]="30", "Number of 30-Minute Lessons", "Number of 60-Minute
Lessons")
The examples I've seen in this case have been that of a yes/no or true/false
scenario. In this case, only two values are present - 30 or 60 (minutes), and
for the life of me I just can't figure out the correct expression to get it
to look at if it's "30" to generate a true statement, or if it's not "30", so
that it may generate a false statement, and wind up under their corresponding
columns accordingly.
By the way, the LessonType field lists different instruments (guitar,
violin, etc.), ContractID field is a primary key field (which lists contract
numbers), and LessonLength has a value of only 30 or 60. How far (or close)
am I from what I need to do, any tips? Thanks in advice for your time and
information.