Search results

  1. M

    Query with multiple tables and multiple sum columns

    Yes, but I added a few fields to the tables to make the database a bit more complex. I'm still trying to get to the same end goal which is a query that shows me the results in the attached image. I am unable to accomplish this.
  2. M

    Query with multiple tables and multiple sum columns

    Hi Mike, I see what you did here but the original example I uploaded was a simple example. I have added some columns to the database attached to so a more complicated example of the tables. I need some help with table design, because I am unable to take this attached example and turn it in to...
  3. M

    Query with multiple tables and multiple sum columns

    If I did it the way you are suggesting then I'd have a table with incomplete rows. It would end up looking something like the attached table. That would work.
  4. M

    Query with multiple tables and multiple sum columns

    I was able to figure out away to do what I was looking for by create a few querys to make it work. However, I can't imagine this is the best way to do this. The attached database shows: Query1 from the original post that provides the wrong information QueryM for the material cost QueryL for the...
  5. M

    Query with multiple tables and multiple sum columns

    I agree that would make things simpler but the database uploaded is just a simple example of what I am trying to do. My labor is going to be entered in by one user and the material is going to be enter in by another user at two different time frames. Is there a way to do what I am trying to do?
  6. M

    Query with multiple tables and multiple sum columns

    Hello, I am attempting to create a query that will allow me to sum all of the labor costs and material cost in the same query. Labor and material costs are stored in separate tables. However, when I do this I am running in to an issue where the sum values are wrong. I think this is because...
  7. M

    Solved Criteria - Referencing Another Field

    Awesome! Thank you!
  8. M

    Solved Criteria - Referencing Another Field

    Maybe this is something i need to figure out how to do in a form not the query. Your example of does provide me with all the information i need. However, i need the end sure to be able to see the data differently. Attached is the view i am trying to show the end user
  9. M

    Solved Query to Return Most Recent Date

    Is it possible to do this with out code? Just in the criteria. I am trying to do something similar https://www.access-programmers.co.uk/forums/threads/criteria-referencing-another-field.320920/
  10. M

    Solved Criteria - Referencing Another Field

    Hello, I am trying to create a query that shows that last time a vehicle was serviced but for multiple services. So the end view would be a matrix that would look like: Row - Equipment Number Column - Service Type Middle - Dates indicating the last time a piece of equipment was serviced for the...
  11. M

    Return max date of multiple columns

    Is it possible to do this with out using code?
  12. M

    Overtime Reports

    JHB, Thank you very much, that solved the problem! Earlier you mentioned that the midnight would create and issue. I think i have solved that. Unfortunately, I have found another problem though. There seems to be an issue calculating overtime to the half hour. I have attached an updated...
  13. M

    Overtime Reports

    Hi JHB, I've been trying my best to get this to work and have run in to another issue that i can't seem to figure out. I have added some more data to the database attached. When i run the report for 16-ABC-3 everything seems to work find. Looking closely at the record on 12/22/16. The OTHours...
  14. M

    Overtime Reports

    I think I figured it out! Option Compare Database Dim OTHours As Integer Function CalculateHours(TheDate As Date, TheName As String, Time_In As Date, DTApproved As Boolean, HourType As String) Dim dbs As DAO.Database, rst As DAO.Recordset, rstBefore As DAO.Recordset Set dbs = CurrentDb...
  15. M

    Overtime Reports

    JHB, This works great! Last thing I think I need to add is to make the default value zero for all categories. Example: IF there are only 8 Reg hours then OT and DT hours need to show a value of 0. Thank you, Steven
  16. M

    Recordset before doesn't exist

    Appreciate all the help, unfortunately this is all a foreign language to me.... I think I may have to find another way.
  17. M

    Overtime Reports

    Well if there isn't a previous record, that would mean there wasn't any hours yet for that day. So if no previous record then Are there more than 8 hours for the current record? If yes, then OT = total hours - 8 and Reg = 8 If no, then OT = 0 and Reg = total hours I have attached the...
  18. M

    Recordset before doesn't exist

    Basically, what i'm trying to do is evaluate the current day. If there is a previous record in the day, then i need to know if there are 8 hours in that record already. If so then current record hours will be all overtime. If there is no previous record, then the first 8 hours of the current...
  19. M

    Recordset before doesn't exist

    I'm really struggling with this. I don't understand why this doesn't work: If rst.BOF = False And rstBefore![Total] >= 8 Then If current record is not the first one and the previous record has over 8
Top Bottom