Re: How to DSUM multiple fields

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Add how? Are you saying you want the sum of the four fields?

=DSum("Nz([08rt], 0) + Nz(]07rt], 0) + Nz([06rt], 0) + Nz([05rt])",
"Collections", "DateValue([Date]) = " & Format(Date, "\#yyyy\-mm\-dd\#"))

Note that you should rename your field from Date: that's a reserved word,
and should never be used for your own purposes. For a comprehensive list of
names to avoid (plus a link to a free utility that will check your
application for compliance), see what Allen Browne has at
http://www.allenbrowne.com/AppIssueBadWord.html

More important, though, is that fact that your field names (05rt, 06rt, 07rt
and 08rt) implies that your tables aren't properly modelled. That looks
suspiciously like a repeating group, which means that your tables don't even
comply to 1st normal form.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Gator" <Gator@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:45834CFD-FE26-4E9B-8791-54CE55124048@xxxxxxxxxxxxxxxx
How could/should I add 07rt, 06rt & 05rt to the following control source
property of the textbox?

=DSum("[08rt]","Collections","Year([Date]) = " & Year([Date]) & " And
Month([Date]) = " & Month([Date]) & " And Day([Date]) = " & Day([Date]))

thanks


.



Relevant Pages

  • Re: calculate headcount
    ... First, rename your field. ... Date is a reserved word, ... shiftstart and shiftend. ...
    (microsoft.public.access.queries)
  • Re: Internet, Goldbach conjecture, cranks and anticranks.
    ... This sounds as if you are saying "embed N into R in ... m iff h< h." ... the even number 567'3 is the sum of two prime numbers: ... e) " There is at least one characterization of the fact of being every x belonging ...
    (sci.math)
  • RE: mid function
    ... 'Control' is an Access reserved word, ... Also, where are you putting this code, in a query, or in a form's event? ... Are you trying to rename a field at run time (it's impossible - in any object! ...
    (microsoft.public.access.modulesdaovba)
  • Re: Syntax Error in Query
    ... you can rename the column. ... In the QBE query-editor of MS-Access by placing a new name before the ... taking the sum of that column (using SUM aggregate function in Design ...
    (comp.databases.ms-access)
  • Re: time field
    ... Rename your control "txtTime" and try If IsNullThen ... ... "Time" is a reserved word in Access. ...
    (comp.databases.ms-access)