How to Count with Running Sum 
Author Message
 How to Count with Running Sum

I wrote code a year ago that worked just fine.  Now it doesn't work.  Here is
the code:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me!CountThem > 1 Then
   Me.GroupFooter0.Visible = True
Else
    Me.GroupFooter0.Visible = False
End If
End Sub

It is in a report that will show the GroupFooter0 (a summary) only if the
detail is more than 2 records.  The code does not work in the OnPrint nor in
the OnFormat.

The error message reads "You entered an expression that has no value.  The
expression may refer to an object that has no value, such as a form, a report,
or a label control."

Well it certainly is a TextBox !!!

Name: CountThem
Control Source: =1
Running Sum: Over Group

The error occurs on the first line: If Me!CountThem > 1 Then

Thanks in advance,

Doyle



Sat, 18 May 2002 03:00:00 GMT  
 How to Count with Running Sum
Doyle,
Just a guess...
If Me.CountThem > 1 Then
instead of
 If Me!CountThem > 1 Then

Jeff Davies


Quote:
> I wrote code a year ago that worked just fine.  Now it doesn't work.  Here
is
> the code:

> Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
> If Me!CountThem > 1 Then
>    Me.GroupFooter0.Visible = True
> Else
>     Me.GroupFooter0.Visible = False
> End If
> End Sub

> It is in a report that will show the GroupFooter0 (a summary) only if the
> detail is more than 2 records.  The code does not work in the OnPrint nor
in
> the OnFormat.

> The error message reads "You entered an expression that has no value.  The
> expression may refer to an object that has no value, such as a form, a
report,
> or a label control."

> Well it certainly is a TextBox !!!

> Name: CountThem
> Control Source: =1
> Running Sum: Over Group

> The error occurs on the first line: If Me!CountThem > 1 Then

> Thanks in advance,

> Doyle



Mon, 20 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. A Different Count between ListParagraphs.Count and the sum of Lists(index).ListParagraphs.Count

2. Conditional Count ( ) or Sum ( )

3. How to do a Running Sum with Only Negatives

4. Running sums on a FORM??

5. Running sum

6. Running sum question again

7. Running Sums in Forms

8. Running Sums with queries

9. AM I missing something - Sum and Cumulative Sum

10. Running Sum

11. Creating a running sum query

12. running sum

 

 
Powered by phpBB® Forum Software