Senin, 30 Juli 2012

Re: [AccessDevelopers] DSum question

 

Duane

I still see the #Error. below are the control source for the fields in the expression

txtWeekTotalHourstblTaskDetails Control Source: =DSum("[TimeSpent]","tblTaskDetals","[TaskUpdateDate] between #" & [txtWeekStart] & "# and #" & [txtToday] & "#")
I even tried with Nz and the field is formatted to left aligned
                =Nz(DSum("[TimeSpent]","tblTaskDetals","[TaskUpdateDate] between #" & [txtWeekStart] & "# and #" & [txtToday] & "#"))

txtWeekStart Control Source: = =DateAdd("d",-Weekday(Date())+2,Date())

txtToday Control Source = =Date()
 
Jim Wagner


From: Duane Hookom <duanehookom@hotmail.com>
To: access developers <accessdevelopers@yahoogroups.com>
Sent: Friday, July 27, 2012 8:45 PM
Subject: RE: [AccessDevelopers] DSum question

 

Try:
=DSum("[TimeSpent]","tblTaskDetals","[TaskUpdateDate] between #" & [txtWeekStart] & "# and #" & [txtToday] & "#")

This assumes you have two text boxes with the appropriate names and values.

Duane Hookom
MS Access MVP
To: AccessDevelopers@yahoogroups.com
From: luvmymelody@yahoo.com
Date: Fri, 27 Jul 2012 23:20:17 +0000
Subject: [AccessDevelopers] DSum question

Hello all,

I have a few text boxes on the form that I was checking the sum of values in a table and I get an #Error error. Am I doing something wrong??

Thank You

Jim Wagner

Below is my expression

=DSum("[TimeSpent]","tblTaskDetals","[TaskUpdateDate] between [txtWeekStart] and [txtToday]")

I have another text box with a similar expression for another table and I do not get any #Error. Below is the expression that works,

=DSum("[TimeSpent]","tblTasks","[TaskDate] between [txtWeekStart] and [txtToday]")


__._,_.___
Recent Activity:

Please zip all files prior to uploading to Files section.
.

__,_._,___

Tidak ada komentar:

Posting Komentar