Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Unanswered: Lost finding Calculate Formulas

    Example of query:

    payrate hoursworked overtime totalpay

    8.5 40
    9 40
    8.5 45
    9.5 32
    8.5 42

    I'm lost figuring how to get overtime to display 0 on 1st record
    0 on 2nd, 63.75 on the 3rd, 0 on the 4th and 25.5 on last.

    Then get totalpay for all records. I though i could search Access 2010 and I'm not looking in the right place or just a bit ignorant or both.

    Any advise is appreciated.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Build it as a report instead of as a query.

    There are thousands of people that take a basic database or programming course that think that everything has to be done as a query. Queries are great, but I think that they ought to be used to feed the tools that are provided (like forms and reports) instead of being used to DO what a report or a form can do more simply.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Oct 2012
    Posts
    2
    I hear you, but when you get a professor says it'll be this way guess what, that what you do.....I finally figured it out though......OverTime: IIf([HoursWorked]>40,[HoursWorked]-40,0)*([PayRate]+[PayRate]/2) on to more pressing problems with this Junk.....Not the class I wanted but not everything is A Grade programming, sometimes you got to take the low level programming classes just to realize that DB are boring peeps

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    A lot of people getting started in IT see databases as boring and programming as exciting. Once they realize that almost every program needs to store data somewhere and that the database is the only practical place to store that data, then databases become a fact of life and a whole lot more interesting.

    Don't worry, you'll get there! It will just take some time.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •