Results 1 to 5 of 5
  1. #1
    Greek is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Location
    Cincinnati OH
    Posts
    3

    I cannot get the syntax right in the RunningSum expression in my query. See attachment.


    Would someone kindly help me get the dsum syntax in the running sum expression. See attachment please.
    Attached Thumbnails Attached Thumbnails DSUM FunctioR3.jpg  

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    A few questions/observations:

    Each Order in your system has only 1 Product, is that correct?
    You will encounter syntax errors with embedded spaces in your field names.
    Order should be linked to Customer on CustomerID not CustomerName.
    Product should be linked to Order on ProductID, not ProductName

    You seem to be missing an OrderDetail table.

    The most common set up for tables where a Customer makes one or more Orders fro one or more Products is as follows:

    Customer-->Order--->OrderDetail<--Product

    I recommend you research Normalization and database design before jumping too deeply into Access.

    See this link (post #3) for more info.

    Good luck.

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    once you have those resolved, with reference to your dsum, you refer to a total field in the tblOrder table - there isn't one. And I think you need to be using orderdate in the criteria part. You also appear to have two sub total fields, one in the query and one in the table

  4. #4
    Greek is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Location
    Cincinnati OH
    Posts
    3
    Thanks very much.

  5. #5
    Greek is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Location
    Cincinnati OH
    Posts
    3
    Thanks, Ajax

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

Similar Threads

  1. Syntax error in query expression
    By ittiekat in forum Queries
    Replies: 6
    Last Post: 02-11-2016, 05:39 PM
  2. Correct syntax for query expression
    By stevekos in forum Queries
    Replies: 1
    Last Post: 07-23-2015, 01:55 AM
  3. Syntax Error in Query Expression
    By Deggsy in forum Queries
    Replies: 5
    Last Post: 06-03-2015, 08:21 AM
  4. Syntax error in query expression
    By That_Guy in forum Programming
    Replies: 3
    Last Post: 08-17-2012, 09:01 AM
  5. syntax in query expression #ERROR help!
    By manos39 in forum Queries
    Replies: 1
    Last Post: 02-26-2011, 12:21 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