Results 1 to 3 of 3
  1. #1
    MikeWaring is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Dec 2010
    Posts
    28

    Smile Cumulative total in query


    We have a query that extracts the SKU and qty of products that we sell daily. This query is used to create a csv file that we send to our supplier's EDI system to re-order those products. The query takes its data from a table that is overwritten every day; this table contains all of that day's sales.
    What I need is to be able to get this query to break the daily re-order down into batches of say £130. When this point is reached, the query will stop and then run another one until the next £130 is reached, and so - on. At each stop, the query will need to delete the records that are in the query.
    If necessary, I can build a Make-table query that will hold the whole day's order from which the query can delete the records mentioned above.
    The query itself only contains 3 fileds, SKU, SumQty and Line Price (ie tot price of each SKU*Qty).

    Is it possible to do such a thing? As mentioned in previous posts, I'm not very good at programming from theory, so if someone could do an example query, I'd be most grateful. I've attached a sampl db that contains the relevant stuff.
    Thanks in advance for any help!
    Mike

  2. #2
    William McKinley is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    59
    A few stupid questions:

    1. Why are you deleting the data table daily?
    2. How are you calculating your reorder points?

  3. #3
    MikeWaring is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Dec 2010
    Posts
    28
    Hi William, thanks for the post. The data table is an import from a csv file that is made by our website to provide us with details of all the daily sales that need shipping that day. We run this in the morning into our database which prints off all the customer invoices / labels etc for the warehouse. Once the database has done this, the data is redundant as it the sales are stored in our website back office. We produce upwards of 200 invoices a day so it would soon make the database a huge file.

    Not sure what you refer to as our "Order points" - maybe you can advise in a little more detail?

    The reason that we need to split the product re-order list is that if we put a large single daily order in to the supplier, it comes on a pallet with a transport company; unfortunately our warehouse is the very last drop on their route which means the order is nearly always too late for us to get the products out that same day. However, if we place the order in several smaller batches throughout the day, it is sent by UPS who deliver to us early morning, thus enabling us to get the products shipped. We have no say on the supplier's transport choices, but we have learnt to use it to our advantage.
    Hope this helps to frame the issues and why we need this project sorted.
    Kind rgds
    Mike

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

Similar Threads

  1. cumulative sum how
    By arctushar@yahoo.com in forum Queries
    Replies: 2
    Last Post: 10-07-2010, 08:43 PM
  2. cumulative rainfall query
    By wilkesgra in forum Queries
    Replies: 5
    Last Post: 09-29-2010, 07:27 AM
  3. Help with Query Total
    By mohara in forum Queries
    Replies: 4
    Last Post: 08-20-2010, 02:35 PM
  4. Cumulative sum (columns)
    By ravens in forum Queries
    Replies: 1
    Last Post: 03-02-2010, 08:14 PM
  5. Total a Query
    By Bridgid in forum Queries
    Replies: 0
    Last Post: 09-05-2009, 02:51 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