G
Guest
With DSUM, the value seems to be calculated proper but shows up blank on the
report.
Here's the code:
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Dim rs As DAO.Recordset
Set rs= CurrentDb.OpenRecordset("Select * From [MonthlyCash]",
dbOpenDynaset)
With rs
CashBal = DSum("[Cash]", "[MonthlyCash]", "[Sales Date] <= #12/31/05# ") '
debug shows CashBal = 1000
End With
MsgBox (CashBal) ' debug shows CashBal = Null
CashBal shows up blank on the report.
report.
Here's the code:
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Dim rs As DAO.Recordset
Set rs= CurrentDb.OpenRecordset("Select * From [MonthlyCash]",
dbOpenDynaset)
With rs
CashBal = DSum("[Cash]", "[MonthlyCash]", "[Sales Date] <= #12/31/05# ") '
debug shows CashBal = 1000
End With
MsgBox (CashBal) ' debug shows CashBal = Null
CashBal shows up blank on the report.