DSUM with date criteria from form

krutoigoga

Registered User.
Local time
Today, 02:53
Joined
May 13, 2010
Messages
34
Hi guys.
I did a search in the forums and on almighty google, but could not find any solutions to my specific issue.

The following code is used to display the "sum" of a field from a table.

Code:
=DSum("[Front]","Tracking","[Front] DATES Between #" & [Forms]![Search]![Text0] & "# And #" & [Forms]![Search]![Text2] & "#")

The table has few fields - that are just numbers, each record has a number and I want the report to show the TOTAL of that field.

Table name: Tracking
Column (field) name: Front
Form name (used to enter dates): Search

Currently I am getting an ERROR in the report.
Can you please point out my mistake in the code?:confused:
Thank you.
 
=DSum("[Front]","Tracking","[Front] Between #" & [Forms]![Search]![Text0] & "# And #" & [Forms]![Search]![Text2] & "#")

get rid of the word DATES.
 
=DSum("[Front]","Tracking","[Front] Between #" & [Forms]![Search]![Text0] & "# And #" & [Forms]![Search]![Text2] & "#")

get rid of the word DATES.

thanks - tried that and no go. :( Still the error.
Just wanted to let you know, that DATES is a date field in the "tracking" table.
 
Then it would be:

=DSum("[Front]","Tracking","[DATES] Between #" & [Forms]![Search]![Text0] & "# And #" & [Forms]![Search]![Text2] & "#")
 
Then it would be:

=DSum("[Front]","Tracking","[DATES] Between #" & [Forms]![Search]![Text0] & "# And #" & [Forms]![Search]![Text2] & "#")

Thanks SOS - that seems to have worked, however the TOTAL displayed in the report for some reason is ignoring the date criteria. It is giving me a total in the table - regardless of the date specified. I have attached a template that I am working on.
Thank you.
 

Attachments

did you manage to get a resolution to this. i to have tried this and the date range seemes to be ignored.
 

Users who are viewing this thread

Back
Top Bottom