Results 1 to 6 of 6
  1. #1
    jltm8 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    3

    Question Expression

    I am using the following expression in access 2007
    =DSum("[jqty]","SHIP","[jprod#] = '" & [pn] & "'")



    I need to add a date range criteria to this expression that looks at the field [expr1] and sums anything between the two selected dates.

    Can anyone help me with this?

  2. #2
    jltm8 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    3

    Question dsum expression

    I am using the following expression in access 2007
    =DSum("[jqty]","SHIP","[jprod#] = '" & [pn] & "'")

    I need to add a date range criteria to this expression that looks at the field [expr1] .

    Can anyone help me with this?

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    This has a multi-criteria example at the bottom:

    DLookup Usage Samples
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Please don't post the same question twice:

    https://www.accessforums.net/access/...ion-18658.html
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    =DSum("[jqty]","SHIP","[jprod#] = '" & [pn] & "' AND [datefield] Between #" & startdate & "# AND #" & enddate & "#")

    How do you want to input the start and end dates - by reference to textboxes on form? Where is the PN criteria from?

    BTW, advise not to use spaces, special characters, punctuation (underscore is exception) in names. Better would be jProdNum.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    jltm8 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Posts
    3
    I have date pickers set up on the from for picking the dates. The PN criteria is pulling from a drop down list on the same form.

    Thank you for the advice, I will be trying this out.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Expression Help
    By Hammer in forum Queries
    Replies: 2
    Last Post: 01-14-2011, 10:30 AM
  2. Looking for help with an expression
    By CoachBarker in forum Queries
    Replies: 3
    Last Post: 11-25-2010, 05:17 AM
  3. Dlookup Expression Help
    By chrismja in forum Queries
    Replies: 10
    Last Post: 10-29-2010, 03:42 PM
  4. Expression value
    By KWarzala in forum Reports
    Replies: 0
    Last Post: 06-15-2010, 12:35 PM
  5. Help With an expression
    By kylem4711 in forum Queries
    Replies: 2
    Last Post: 04-23-2009, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums