Hi Guys
I am having real trouble with a Dsum on a form that runs on a forms onload event.
what I am trying to do is to sum all the payments from the table tblAccountTransactions" where the "TransType" is "money in" and the "EntryDate" is between the dates in the form "frmOpenReport" start and End dates
the code i have is below
Code:
Dim StartDate As Date
Dim EndDate As Date
StartDate = [Forms]![frmOpenReport]![StartDateTxtBox]
EndDate = [Forms]![frmOpenReport]![EndDateTxtBox]
Me.IncomeTXTBox = Nz(DSum("[Payment]", "[tblAccountTransactions]", "[Transtype]='Money In'" And [EntryDate] >="#" & StartDate & "#" And [EntryDate] <= "#" & EndDate & "#"), 0)
im getting the Run-time error 2465 cant find the feild '|1' referred to in your expression
any help would be wonderfull,
many thanks
Steve