Struggling to create a opening balance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eeze
    New Member
    • Oct 2008
    • 3

    Struggling to create a opening balance

    Hi Everyone
    I am very new to access.Can someone help me.I am trying to create a form with a daily Opening balance using sql.My tbl looks like this below.I willbe very grateful.

    Date Opening Balance Withdrawal Deposit Balance
    2008/10/01 73100 23400 0 49700
    2008/10/02 49700 13800 90000 125900
  • Krandor
    New Member
    • Aug 2008
    • 50

    #2
    You weren't very clear as to what you wanted but I'll give it a try.

    If you want the amount of the opening balance for today, then you will need something like this:

    SELECT Opening_Balance FROM tbl_Savings WHERE Date = (SELECT Max(Date) FROM tbl_Savings)

    That will give you the most current balance.

    By the way, I think date may be a reserved word. If so it may give you trouble in your coding. It is generally not a good idea to have field names have anything close to reserved names.

    Comment

    • eeze
      New Member
      • Oct 2008
      • 3

      #3
      Originally posted by Krandor
      You weren't very clear as to what you wanted but I'll give it a try.

      If you want the amount of the opening balance for today, then you will need something like this:

      SELECT Opening_Balance FROM tbl_Savings WHERE Date = (SELECT Max(Date) FROM tbl_Savings)

      That will give you the most current balance.

      By the way, I think date may be a reserved word. If so it may give you trouble in your coding. It is generally not a good idea to have field names have anything close to reserved names.
      Hi Krandor
      Firstly,many thanks on your response and suggestion.I am going to try this.I will let you know how it goes!

      Comment

      Working...