conditionally counting / averaging fields in footer of a report ?

H

Howard

I have a report based upon a cross tab query. Since I don't know how
many columns are going to be returned my detail section is 38 unbound
text boxes whose control source and horizontal position is set up on
report open using code like...

Me("text" & Format$(x)).ControlSource = "=[" & rs(x + 3).Name & "]"
Me("text" & Format$(x)).Left = ((x - 1) * DataWidth) + LeftHandDataEdge

In the footer of the report, for each column of text boxes, I want to
show the number and percentage of of them that contained "A", "B" or "C".

Putting a text box in the footer with, eg =sum([text15])as the control
source does not seem to work maybe because the text boxes are unbound.

How - and where - do I write the code to do the calculations at run time?

Howard
 
H

Howard

Duane said:
I think the Crosstab solution found at
http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=4&SID=975f36c1286acz9df929a51ef8fd17zf is much more flexible and efficient.
Thanks Duane, I'll have a go although it will need a considerable
rewrite as my report contains much code to conditionly format every
other text box on each row depending in the value contained in the text
box to its immediate left, plus it uses the tilt header to turn the
quite long column labels through 90 degrees as I have somthing around 46
columns and must have then all on one row.

Howard
 
D

Duane Hookom

If your report is that complex, I would consider push (or pulling) the data
to Excel for formatting and reporting.
 

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