Senin, 30 Juli 2012

Re: [AccessDevelopers] DSum question

 

Duane

Glaring error showed me one issue and did solve the problem. I put it in the immediate window and it could not find the table. I had tblTaskDetails spelled incorrectly. I corrected it and then it worked. 

Thank You Again 


 
Jim Wagner


From: Duane Hookom <duanehookom@hotmail.com>
To: access developers <accessdevelopers@yahoogroups.com>
Sent: Monday, July 30, 2012 9:10 AM
Subject: RE: [AccessDevelopers] DSum question


How about this as a control source:
=DSum("[TimeSpent]","tblTaskDetals","[TaskUpdateDate] between DateAdd('d',-Weekday(Date())+2,Date()) and Date()")

Open the debug window and enter
?DSum("[TimeSpent]","tblTaskDetals","[TaskUpdateDate] between DateAdd('d',-Weekday(Date())+2,Date()) and Date()")

Duane Hookom
MS Access MVP

________________________________
> To: AccessDevelopers@yahoogroups.com
> From: luvmymelody@yahoo.com
> Date: Mon, 30 Jul 2012 07:22:01 -0700
> Subject: 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<mailto:AccessDevelopers%40yahoogroups.com>
> From: luvmymelody@yahoo.com<mailto:luvmymelody%40yahoo.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]")




                       

------------------------------------


Please zip all files prior to uploading to Files section.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/AccessDevelopers/join
    (Yahoo! ID required)

<*> To change settings via email:
    AccessDevelopers-digest@yahoogroups.com
    AccessDevelopers-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    AccessDevelopers-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



__._,_.___
Recent Activity:

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

__,_._,___

Tidak ada komentar:

Posting Komentar