S
SAC
Access 2003
Having trouble getting a dsum in a query to work correctly.
I have a form with a control, txtCE, on it formatted as a short date.
I have "5/1/10" entered in the control
I then have a query with one column like this: CE: [Forms]![frmARAging-2-Prelim]![txtCE]. This show correctly when I run the query.
Then I have a column in the query with a dsum like this: C: DSum("DebitAcct","ARINH","[CustID]=" & [CUSTKEY] & " And [Date] >= " & [CE])
This displays the incorrect amount.
I then change the dsum to C: DSum("DebitAcct","ARINH","[CustID]=" & [CUSTKEY] & " And [Date] >= #5/1/10#") and this displays the correct amount.
What can I change to make it work correctly?
Thanks for your help.
Having trouble getting a dsum in a query to work correctly.
I have a form with a control, txtCE, on it formatted as a short date.
I have "5/1/10" entered in the control
I then have a query with one column like this: CE: [Forms]![frmARAging-2-Prelim]![txtCE]. This show correctly when I run the query.
Then I have a column in the query with a dsum like this: C: DSum("DebitAcct","ARINH","[CustID]=" & [CUSTKEY] & " And [Date] >= " & [CE])
This displays the incorrect amount.
I then change the dsum to C: DSum("DebitAcct","ARINH","[CustID]=" & [CUSTKEY] & " And [Date] >= #5/1/10#") and this displays the correct amount.
What can I change to make it work correctly?
Thanks for your help.