Count unbound text box

Brian900

Registered User.
Local time
Today, 15:33
Joined
Oct 10, 2002
Messages
51
I have an unbound textbox (Text23) on a report with the following code in the OnFormat event of the section.

Private Sub GroupFooter1_Print(Cancel As Integer, PrintCount As Integer)
If Text23.Value >= 2 Then
Text25.Value = "Transfer"
ElseIf Text23.Value <= 1 Then
Text25.Value = "OK"

End If
End Sub

Code works fine!

I would like to count the number of times the value of Text25 equals "Transfer" in the report footer. I've tried to enter in the control source "=Count(IIF(([Text25]="Duplicate",0))" but since text25 is not a field it will not work. I've also tried some code in the OnFormat section of the report footer. I could not get that to work either. Solutions?

Thanks in advance, Brian.
 
=Sum(Iif([Text23] >= 2,1,0)) as the control source for the textbox
 
Thanks for the reply. This did not work. I'm postive I cannot reference an unbound textbox using this method. Since Text23 is not a field it is not recognized. Any other thoughts?

Brian
 

Users who are viewing this thread

Back
Top Bottom