Dynamic Crosstab with Parameters

L

LLW

I have created a Dynamic Crosstab report using the code
from Microsoft. It works fine until I set up parameters
for the Crosstab query.
The query will return 3 records which is correct. The
report will print these 3 records, then print the 3rd
record repeatedly for pages.
It is like it does not recognize the EOF in the code:

Why doesn't it stop printing when the recordset is
complete?

Thanks-
LW

If Not rstReport.EOF Then
If Me.FormatCount = 1 Then
For intx = 1 To intColumnCount
Me("col" + Format$(intx)) = xtabCnulls(rstReport
(intx - 1))
Next intx

For intx = intColumnCount + 2 To contotalcolumns
Me("col" + Format$(intx)).Visible = False
Next intx
rstReport.MoveNext
End If
End If
 

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