Results 1 to 2 of 2
  1. #1
    roybb is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    5

    Entry of Value to a Field In One Table That Gets Subtracted From A Field in a Related Table

    Hi Everyone,



    So I have 2 tables. The first table "Customer" contains a field "Total Minutes Remaining on Contract ". The Second table (related) "Customer Session" has a field called "Contract Minutes Used".

    What I want to do is have it so that when I enter in the total amount of contract minutes used in a session it is automatically subtracted from the "Total Minutes Remaining on Contract" field.

    Can anyone make any suggestion as to how I might accomplish this?

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Saving this calculation to table is bad idea and poor db design. Calculate the balance when needed.

    Do an aggregate query that sums the minutes used grouping on the customer. Then join that query to the Customer table.

    Access Help has guidelines on building aggregate query.

    Since customers could have multiple contracts over time, really should have a Contracts table.

    Did you review the link I referenced in your other thread?
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 08-07-2014, 07:31 AM
  2. Replies: 1
    Last Post: 04-01-2013, 02:18 PM
  3. Replies: 4
    Last Post: 04-26-2012, 11:04 AM
  4. Replies: 14
    Last Post: 03-01-2012, 02:39 PM
  5. Replies: 4
    Last Post: 04-18-2011, 07:18 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