Results 1 to 6 of 6
  1. #1
    challenger is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    6

    Post running totals

    my problem is that I have a an inventory of 20 engines that are being tested and i need to keep an accurate account of service hours between each overhaul . I have tried a number of time to work out a query ( i'm a new user of databases ) and cant get my list to update each engine with it the number of hrs . ie all 20 engines could run 24hrs ( or any other hrs ) but if one fails or there is a problem that engine starts at 0 hrs after an overhaul . this is repeated so eventually all 20 engines could show different running totals every time i put in 24 hrs or 16 hrs or whatever until it is overhauled . The number of hours inputed each session will be the same for each engine only it's hours between overhaul will change .


    I have written all my database to take care of overhauls reports spares etc but this is really killing me . Has anyone any idea or seen any code that will do this for me .
    Thx

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Calculated data is not typically stored in tables. However, I believe you have a circumstance where it is necessary to store this sum.

    The trick will be finding a Business Rule that allows for accurate updating of the DB. What I mean is, find some activity within operations that can translate to someone clicking a button to update the hrs. for an individual motor. I first though this could be done during an overhaul but, then you mentioned the hrs. are a daily cycle. So, identify something in operations that will allow for accurate recordkeeping.

    I would start with separate tables and forms to create a Module, so to speak, specific for this function. Afterwards, you can decide how to merge it with your main DB.

    Maybe you can assume 24 hrs. unless a motor has a hiccup. In this circumstance, a User can input the hiccup.

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Summing the hrs should not be difficult. Using a RunSum would do the trick. If used in a form, try this:
    =RunSum([Form],"PrimaryKey",[PrimaryKey],"FieldToSum")
    If in a query, see this article: http://support.microsoft.com/kb/290136

    HTH

  4. #4
    challenger is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    6
    thanks for the help but it seems this is not what I want sorry .

    example

    engine total hrs

    1 52

    2 118

    3 84

    4 0 ( just been overhauled)

    these totals are made up by adding the hours to the respective engines . like so

    session 1 24
    session 2 7
    session 3 32
    session 4 29
    session 5 23

    I hope this makes it a bit clearer . there will be 2 tables i think such as session and running hours . If i can't figure this out i will fall back on an excel sheet to do the calcs which i don't really want to do

    Thx

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    To get the results you seek as my understanding goes, then use a Group By Query and filter with your criteria. Using both tables, Engine and Session. Hard to say without seeing what you have. On your form of course you could use a Combo Box to filter by Session. Without specific table names, fields it is hard to figure out, at least for me.

  6. #6
    challenger is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    6
    Thanks for the help . i will potter around with this for a while . I didn't think it would be this hard to incrementally increase each number in a list by the same amount . maybe i should use the excel option
    Thanks anyway

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

Similar Threads

  1. Running Totals in Access Query
    By CalvT in forum Queries
    Replies: 2
    Last Post: 01-10-2013, 03:27 AM
  2. Replies: 3
    Last Post: 10-11-2012, 10:12 AM
  3. Replies: 1
    Last Post: 06-09-2012, 05:27 PM
  4. Create Running Totals
    By dascooper in forum Access
    Replies: 9
    Last Post: 04-05-2011, 09:22 PM
  5. Select query for running totals
    By asawadude in forum Queries
    Replies: 2
    Last Post: 10-07-2010, 03:41 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