Results 1 to 2 of 2
  1. #1
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125

    My head is starting to spin

    I feel like I might be going a round about way of getting what I want.



    An employee enters into a time sheet form hours that they work on a project. There can be multiple occurances of this as they work on the same project day to day. I then have a query called [qryDetailedHours] that sums the hours for each job they work on.

    In a different form they are logging what they are doing on each project, and this includes the weight of what they have worked on / detailed (industrial work). I have another query called [qryDetailedWeight] that sums up this weight.

    What I'm trying to get, my end goal, is "Tons/Hr". The weights however are in lbs. I want this to show up on the Project Info form, and I've gotten both the Hours and Weights to show up on this form by way of subforms. However when I try to slap tons/hr on there from a query that I've made it shows the same number for every single project.

    The query uses the Job Number from the Project Info table related to the information in my two queries and then I have an expression for Tons: [qryDetailedWeight].[SumOfWeight]/2000 and TonsPerHour: [Tons]/[qryDetailedHours].[SumOfHours]

    In the query all the job numbers are showing up with the right tons and tons/hr but in the Project Info Form things just don't connect.

  2. #2
    eww is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    125
    well I got what I want but definitely not using a query. I'm still learning Access and all what to use where and when in the vba editor. I've got the Weight and Hours both in subforms so I figured out how to use that data to calculate the tons/hr in the vba.

    Dim Tons
    Tons = Me.sfrmDetailedWeight.Form.SumOfWeight / 2000
    Me.TonsPerHour.Value = Tons / Me.sfrmDetailedHours.Form.SumOfHours

    I'm sure there's still plenty to go wrong with my simple solution, but that's why it's a work in progress.

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

Similar Threads

  1. Help banging my head against a wall working on this
    By Brian Foshee in forum Programming
    Replies: 1
    Last Post: 06-04-2010, 08:30 AM
  2. Replies: 7
    Last Post: 05-21-2010, 10:37 PM
  3. Starting an Access database for a group...
    By kkrishna in forum Access
    Replies: 8
    Last Post: 05-19-2010, 05:29 PM
  4. In over my head with a database class
    By fixittech in forum Database Design
    Replies: 3
    Last Post: 01-22-2010, 07:45 AM
  5. Replies: 9
    Last Post: 04-28-2009, 05:42 PM

Tags for this Thread

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