Results 1 to 7 of 7
  1. #1
    scsuflyboy is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    5

    Query setup (Sum, Max, etc)

    Topic title doesn't explain my issue, so here goes...



    I have a form that a training coordinator uses. On this form are separate category entries (facility familiarization, equipment familiarization, communications, etc...there are 9 categories). Within each category the training coordinator enters the date of training, training description and number of hours of training. Each time training is done the training coordinator documents the training on this form. This is done many times throught the year.

    Also on the form is a drop down to select the year (i.e., 2011, 2012, etc).

    Here is what I need to do.

    I want to create a report that will list ONLY the categories, the most recent date of training and the total number of hours for the year. The report would be based on a query of the table but I can't figure out how to set up the query. the table will have many entries but I want the user to enter the employee name, enter the year of training, then display a total of the hours for the year in each category and the most recent date of training for that category.

    Any ideas or help would be greatly appreciated...Also please note that I am an EXTREMELY novice access user.

    Thanks in advance.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Is this all on one table? If so,

    SELECT Category, max(trainingDate) As MaxTrainingDate
    FROM myTable
    WHERE employeeName = Forms!FormName!controlName AND trainingYear = Forms!FormName!controlName;

    You can bind that query to whatever you want (subform, Report, etc)

  3. #3
    scsuflyboy is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    5
    Can you explain a little more? Where do I put this information when I build the query...I didn't say this earlier but I am a novice access user (hesitate to even use the word "Programmer".

    Here is a pic of my query if that helps...

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    The field names aren't very descriptive.
    Tell me which fields holds the date of the training.

  5. #5
    scsuflyboy is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    5
    Airport Fam and Aircraft Fam are the fields that contain the date of training

  6. #6
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Which one contains the date you want to check?

  7. #7
    scsuflyboy is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    5
    All of them...Also, these aren't all of the fields in the table. It is quite a large table. There are 13 or 14 categories in all.

    I jsut provided a few to give you an idea of what it looked like and hopefully from an example I can figure out the rest.

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

Similar Threads

  1. Need help with database setup
    By ctyler in forum Database Design
    Replies: 6
    Last Post: 08-30-2010, 01:35 PM
  2. Table Setup and Relationships
    By CoachBarker in forum Database Design
    Replies: 5
    Last Post: 08-16-2010, 09:04 AM
  3. Newbie Table Setup
    By debl5 in forum Access
    Replies: 3
    Last Post: 05-15-2009, 07:46 AM
  4. user formula setup
    By elios115 in forum Access
    Replies: 2
    Last Post: 08-09-2008, 06:40 AM
  5. Please help with table setup
    By newhelpplease in forum Access
    Replies: 0
    Last Post: 10-14-2007, 01:15 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