[AccessD] Query Fields Count

Tony Septav iggy at nanaimo.ark.com
Mon May 12 12:20:14 CDT 2008


Hey All
I started off wanted to take a crosstab report that was 19inches in size 
and convert it through code to fit on several 8 1/2 by 11 pages in a  
report. That works.
Then I wanted to make the report flexible so that as more items got 
added the report would grow to reflect the new items (columns) in the 
crosstab. That works.
Then I wanted the report to be able to adjust for varying items for a group.
Ie.
Store 1 has 22 items
Store 2 has 13 items
Store 3 has 35 items
Store 4 has 26 items

The problem I am running into is when I group on the store and then loop 
through the the table and and assign the store number to a variable 
(functon) used in the crosstab query. I do a QryDF.fields .count, but 
something odd occurs. It only reflects the first store field count.
Ie
Store 1 22 fields
Store 2 22 fields
Store 3 22 fields
Store 4 22 fields
If I ignore Store 1 then
Store 2 13 fields
Store 3 13 fields
Store 4 13 fields
If I do them manually one by one I get the correct number of fields. I 
have even tried recreating the query for each loop. I also tried Set 
QryDF = nothing.
Am I missing something here.

Thanks for any help.





More information about the AccessD mailing list