Results 1 to 2 of 2
  1. #1
    mindoff is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    1

    Question Loop in Query ? that will update field based on previous field value

    I'm very beginner in Access and challenges I'm facing is over my skills

    Due to large amounts of data to be calculated I need to move my excel data to access.
    I have created 3 tables: stock, orders and demand.

    Click image for larger version. 

Name:	STOCKS.png 
Views:	18 
Size:	20.8 KB 
ID:	26396 Click image for larger version. 

Name:	ORDERS.png 
Views:	18 
Size:	39.8 KB 
ID:	26397Click image for larger version. 

Name:	DEMAND.png 
Views:	18 
Size:	35.4 KB 
ID:	26398

    based on them I need to update Balance in table Schedule for each item in each week of year

    Click image for larger version. 

Name:	BALANCE.png 
Views:	18 
Size:	15.9 KB 
ID:	26402

    first I need to sum quantites from 3 tables for youngest week in youngest year (51/2016),
    then base on this i need to update following weeks for all my 2000 items.

    Click image for larger version. 

Name:	BALANCE RESULT.png 
Views:	18 
Size:	8.6 KB 
ID:	26403

    many thanks in advance for suport

    Konrad

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Don't do this in a query, running sums (or calculations based on running sums) are much more efficiently handled in reports. You would not be able to use this proposed query for data entry anyway so the report would be your best alternative.

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

Similar Threads

  1. Replies: 3
    Last Post: 09-19-2014, 08:22 AM
  2. Replies: 4
    Last Post: 01-23-2014, 04:34 PM
  3. Replies: 1
    Last Post: 08-31-2011, 04:03 PM
  4. Make new field based on previous field's answer
    By VictoriaAlbert in forum Access
    Replies: 1
    Last Post: 04-11-2011, 09:54 PM
  5. Replies: 2
    Last Post: 05-05-2010, 02:52 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