Connecting Tech Pros Worldwide Help | Site Map

Report based on crosstab query

Richard Hollenbeck
Guest
 
Posts: n/a
#1: November 13th, 2005, 02:33 AM
I'm building a table of grades report based on a crosstab query where
students are in the rows and the activities are in the columns. The grades
are in the body where the rows and columns intersect.

The problem is that the activities will change from semester to semester.
Will I need to redesign a new report every semester to reflect the changes?
Maybe I should just export the results of the query to a spreadsheet. ??


Rich P
Guest
 
Posts: n/a
#2: November 13th, 2005, 02:33 AM

re: Report based on crosstab query


Add an additional column to your data table for semester. Then you
query on the semester. Student Name, Activity, Semester. It won't
matter what the activities are for any semester. The only catch is if
in Spring you have 10 activities but summer or fall has a different
number of activities and your report is set for 10 activities well you
could create your report with say 20 columns. If the query yields less
than 20 columns, you hide the columns/fields-textboxes that don't get
used. Name your textboxes like

txt1, txt2, txt3,...
Then you can loop through the controls collection of your report

Dim ctl As Control, i As Integer, j As Integer
Dim QD As Querydef
Set QD = CurrentDB.Querydefs("yourQuery")
j = QD.Fields.Count
For Each ctl in Me.Controls
If i > j And ctl.Name = "txt" & i Then
ctl.Visible = False
End If
i = i + 1
Next

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report that does not display format properly (Based on Crosstab query)..... kcdoell answers 6 May 12th, 2008 06:08 PM
Report based on Crosstab Query.. Tim Hunter answers 1 December 21st, 2006 02:45 AM
Filtering a dynamic report based on crosstab query Richard Hollenbeck answers 0 November 13th, 2005 07:14 AM
Report Based On Crosstab Query Question - A2K No Spam answers 4 November 13th, 2005 02:51 AM