**DSum - Date Criteria problem**

John M

Registered User.
Local time
Today, 22:59
Joined
Nov 20, 2001
Messages
69
Anyone!

How does the date criteria work for the DSum function?? I can't get it to Sum using the following methods. Thanks in advance.

First Method:
sSQL1 = "[ReturnDate] = #" & Format(Text31, "dd/mm/yyyy") & "#"
nRevenue = DSum("[LateCharge]", "tblHireTransaction", sSQL1)

Second Method:
sSQL1 = "[ReturnDate] = #" & Format(Text31, "dd/mm/yy") & "#"
nRevenue = DSum("[LateCharge]", "tblHireTransaction", sSQL1)

[ReturnDate] is of Date/Time data type. Text31 is an unbound field on my form with format "short date" and default "=Date()".
 
Thanks Pat,

You've solved the problem again. Many thanks.
 

Users who are viewing this thread

Back
Top Bottom