Set NewRowOrCol?

itchy

Utterly confused since...
Local time
Today, 16:09
Joined
Jan 25, 2001
Messages
31
Hello all,

I apologize for posting this in a second forum but I have had no response from the 'Reports' forum (after 4 days!) and I am getting desperate!

I have a report set up with 2 columns. I have some data and a chart for each page. What I have done is placed data in the detail section and the chart in the group footer. The NewRowOrCol property of the Group footer is set to "Before Section" so that the data will appear in the left column and the chart will appear in the right column. This works great except on a page where there is too much data and the data flows over into the right column of the page, forcing the chart to appear on the next page. What I have tried to do is this: I set up a public variable for the report called ct. This variable will be incremented in the onFormat event of the Detail section. Also in the onFormat event of the detail section I check to see if ct is greater than 41 (the maximum number of rows that I can have in the left column before the data starts to spill over into the right column) If ct is greater than 41, I try to set the footer's NewRowOrCol property to "None" so the chart will follow the last piece of data in the right column. I am getting a runtime error saying that you can't assign a value to this object. The Access documentation clearly states "You can set this property by using the section's property sheet, a macro, or Visual Basic." Am I misunderstanding something? Here is my code:

Option Compare Database
Option Explicit
Public ct As Integer

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
ct = ct + 1

If ct > 41 Then
Me.GroupFooter1.NewRowOrCol = 0
Else
Me.GroupFooter1.NewRowOrCol = 1
End If
End Sub

Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
ct = 0
End Sub

What am I doing wrong?

Thanks!
Itchy
 

Users who are viewing this thread

Back
Top Bottom