DSUM value shows up blank on report

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top