Duane,
I knew you would say something about the 117 name. I do know better than that.
I tried your expression and I get the same results. I scroll through the records and as soon as I get to yesterdays date and beyond I get a value in the control. It had worked before and so I am not sure what is happening.
Jim Wagner
________________________________
________________________________
From: Duane Hookom <duanehookom@hotmail.com>
To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>
Sent: Friday, July 29, 2011 4:30 PM
Subject: RE: [MS_AccessPros] DSum question
Jim,
It really doens't matter which "form" the data is displayed. This expression is all about the tables and fields. The only requirement is that Text117 is on the same form as the text box.
Today's date is Date()
=DSum("[TimeSpent]","tblTaskDetails","[TaskUpdateDate] =#" & Date() & "#")+Nz([Text117],0)
BTW: "Text117"? Kick it up a notch. Every significant control deserves a decent name ;-)
Duane Hookom
MS Access MVP
To: MS_Access_Professionals@yahoogroups.com
From: luvmymelody@yahoo.com
Date: Fri, 29 Jul 2011 22:52:11 +0000
Subject: [MS_AccessPros] DSum question
Hello,
I have a form with a text box with the below expression. This expression used to work, but it seems that something has changed on it.
I am trying to get the totals of today's task hours from the main form and the subform. For some reason I can only see totals for dates that do not happen on today. So the expression works but not for today's date.
TimeSpent is on the main form
TaskUpdateDate is on the subform from the table tblTaskDetails.
Text117 is on the main form
I started with this expression but realized if there is a null there would be 0. So I tweaked the expression to the one below.
=nz(DSum("[TimeSpent]","tblTaskDetails","[TaskUpdateDate] = [Date]")+[Text117],0)
If anyone sees the problem I would appreciate the help
Thank you
Jim Wagner
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Jumat, 29 Juli 2011
Re: [MS_AccessPros] DSum question
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar