Results 1 to 2 of 2
  1. #1
    nazimscr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Location
    Usa
    Posts
    4

    Get difference of Min and Max

    Dear All,



    I am part of a fleet management company with many trucks and I am trying to develop a database which will tell us the life of each tires in terms of kilo meters. Query should be able to tell us how much km has the tire being driven in different trucks. Below are the different scenarios of changing tires.
    1. New tires installed in the truck. Vehicle KM is recorded (in the current km field in the attached file), this value can be recorded as Min value.
    2. Tires are transfered within trucks, again vehicle Km is recorded.
    3. Tires are trasnfered between trucks with vehicle closing KM recorded in current km field, this value would the Max value.


    By taking the difference of Max and Min Km, i will be able to generate how much km each tires has produced, however due to scenario 3 (transferred between trucks) this logic will not work. Therefore i thought of using a calculated field which will be concatenation of truck number and tire number ie field T&T combined.

    I would like to create a query which tell me how km each tires has produced.

    My apologies i am new to access with little knowledge of query.

    I have attached the file, my data is in the tasks table. i think calculation should be based on only 3 fields 1) truck number 2) current KM and 3) Tyre number

    I would really appreciate your help on this regard.

    Regards,

    Nazim
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    You want to calculate values from related records. This will probably require subquery. Review http://allenbrowne.com/subquery-01.html
    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. Difference Algorithms
    By dandoescode in forum Programming
    Replies: 6
    Last Post: 05-18-2012, 10:29 AM
  2. Time Difference
    By jlclark4 in forum Queries
    Replies: 4
    Last Post: 10-13-2011, 09:23 AM
  3. Mark the difference
    By zhshqzyc in forum Access
    Replies: 1
    Last Post: 01-28-2011, 08:49 AM
  4. difference between drivers
    By tomc1 in forum Access
    Replies: 0
    Last Post: 08-04-2009, 10:41 AM
  5. Time difference
    By jguidry in forum Programming
    Replies: 1
    Last Post: 11-15-2008, 12: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