Jacob Hilderbrand
05-08-2006, 10:03 PM
I want to have a running balance in a form, and I had it working with this:
=DSum("[Amount]","TblInvoice","[TblInvoice]![InvoiceID]<=[FrmInvoiceID]")+ DSum("[GST]","TblInvoice","[TblInvoice]![InvoiceID]<=[FrmInvoiceID]")
So basically I want to sum the Amount and GST fields. I was basing this off of the InvoiceID and it works, but if I add a new record for a previous date, it would not work.
I wanted to change it to refer to the Date field:
=DSum("[Amount]","TblInvoice","[TblInvoice]![Date]<=[Date]")+ DSum("[GST]","TblInvoice","[TblInvoice]![Date]<=[Date]")
But that just showed #Error.
Can this be made to work with the Date field?
Also, the InvoiceID is just an auto number, so I wonder if there is a way to just reset the numbers so they are in proper order based on the date.
Thanks
=DSum("[Amount]","TblInvoice","[TblInvoice]![InvoiceID]<=[FrmInvoiceID]")+ DSum("[GST]","TblInvoice","[TblInvoice]![InvoiceID]<=[FrmInvoiceID]")
So basically I want to sum the Amount and GST fields. I was basing this off of the InvoiceID and it works, but if I add a new record for a previous date, it would not work.
I wanted to change it to refer to the Date field:
=DSum("[Amount]","TblInvoice","[TblInvoice]![Date]<=[Date]")+ DSum("[GST]","TblInvoice","[TblInvoice]![Date]<=[Date]")
But that just showed #Error.
Can this be made to work with the Date field?
Also, the InvoiceID is just an auto number, so I wonder if there is a way to just reset the numbers so they are in proper order based on the date.
Thanks