On my details section (in my report ) I've got a procedure On Format event
I debuged it and I've noticed It been called twice so the msgbox is show twice too
Why does it happend and how do i get rid of it?
here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Balance As Integer
If Forms!printre.rsNum = False Then
MsgBox "no records after this date"
Else
Balance = Me.Sum_Of_Credit - Me.Sum_Of_Debit + Forms!printre.MyoBalance
If Balance > 0 Then
Me.lblStatus.Caption = "your debt: "
Me.lblBalance.Caption = Str(Balance)
Else
Me.lblStatus.Caption = "your credit "
Me.lblBalance.Caption = Str(Balance)
End If
Me.lblOpeningB.Caption = Str(Forms!printre.MyoBalance)
End If
End Sub
thanks in advance, ofir
I debuged it and I've noticed It been called twice so the msgbox is show twice too
Why does it happend and how do i get rid of it?
here is the code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Balance As Integer
If Forms!printre.rsNum = False Then
MsgBox "no records after this date"
Else
Balance = Me.Sum_Of_Credit - Me.Sum_Of_Debit + Forms!printre.MyoBalance
If Balance > 0 Then
Me.lblStatus.Caption = "your debt: "
Me.lblBalance.Caption = Str(Balance)
Else
Me.lblStatus.Caption = "your credit "
Me.lblBalance.Caption = Str(Balance)
End If
Me.lblOpeningB.Caption = Str(Forms!printre.MyoBalance)
End If
End Sub
thanks in advance, ofir