Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Unanswered: Value returned only for part of calculation

    If I use this in a Query:
    Pay: (Employees!Rate*[Time Card Hours]!Hours)

    I get a result for every Empl in a dec value.

    But if I add this:

    Pay: (Employees!Rate*[Time Card Hours]!Hours) + Per Diem

    I only get a $ value for the Empl with per diem in the tables, the rest are blank.. What am I missing??

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    how are these columns defined in the tables
    what is per diem?, where is the value retrieved form, should it be [emlpoyees]![per diem]?

    why would you expect to see soemthing in every row in the table
    a derived value should be calculated ont he fly in a query, not stored in a table (unless you have a very good reason eg legal, performance or redcuing complexity)
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2003
    Posts
    300
    Yes, sorry, it does read:

    (Employees!Rate*[Time Card Hours]!Hours) + [Employees]![Per Diem]

    IF there is no per diem amount in PER DIEM, it works fine..like this
    EMP HRS RATE PER DIEM RESULT
    1 10 20 200
    2 20 25 500
    3 30 30 900



    but when there is per diem, I only get the one employee with per diem in the results, the rest are blanks..
    EMP HRS RATE PER DIEM RESULT
    1 10 20 15 500
    2 20 25
    3 30 30


    instead of this


    EMP HRS RATE PER DIEM RESULT
    1 10 20 15 500
    2 20 25 500
    3 30 30 900
    Last edited by databasemon; 08-13-08 at 13:59.

  4. #4
    Join Date
    Nov 2003
    Posts
    300
    I think I got it now,, there has to be a $0.00 in the per diem to work,, some of the fields had blanks.

Posting Permissions

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