Results 1 to 3 of 3
  1. #1
    Louis is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2023
    Posts
    4

    Help with Calculating Opening Stock for Daily Transactions

    I need to use the last trsaction day's opening balance as opening stock for the next transaction day.

    Have set up this bsic transaction table with the following fields:
    TransID, TransDate, ProductName, StockIn, Orders

    I've created a query which calculates the daily_net_stock (stockIn - Orders). The query also has calculated date fields showing transaction startdate and enddate.

    I need help with an formula I tried to achieve the opening stock by writing;

    OpeningBalance: IIF([enddate]=[startdate],0,(daily_net_stock.transdate()-1))



    What I desire is for the formula to return 0 as opening balance for the first transaction day and to return the closing balance for the previous day in subsequent daily transactions.

    Thank you.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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.

  3. #3
    Louis is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2023
    Posts
    4
    Thanks June7

    I found a solution in the second link

    https://www.access-programmers.co.uk...alance.296105/

    Thank you again.

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

Similar Threads

  1. Calculating daily stock totals
    By chrisdd in forum Access
    Replies: 2
    Last Post: 03-26-2020, 03:35 PM
  2. Difficulty calculating daily running total
    By Mildleave in forum Access
    Replies: 1
    Last Post: 10-29-2019, 02:18 PM
  3. Replies: 4
    Last Post: 10-10-2015, 05:09 PM
  4. Calculating Stock On Hand
    By namu23 in forum Access
    Replies: 11
    Last Post: 12-29-2014, 09:08 AM
  5. Calculating stock balance
    By Demerit in forum Queries
    Replies: 11
    Last Post: 12-17-2013, 01:57 AM

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