Results 1 to 3 of 3
  1. #1
    Madmax is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    80

    New Database with a question on relationship

    Good morning fellow access users,
    I am currently working a new DB that I have a question about. This is for tracking physical training for a military squadron. I have my table for each person (PT_ID) and I have a table for each PT test(PT_Test). Now on the PT_Test table, I have the following fields:
    Table Key(Formulated from excell)
    DBPTID (the ID of the person doing the test. this is relationshiped to the PT_ID Field)
    Body Mass Index
    Weight
    Height
    Test Date


    Cardio
    Abdo circ
    Pushups
    Sit-ups
    Mode
    Score
    Test due (Not needed)
    Fitness Level

    What I am wanting to do is use the most recent record for each person to plug in their current test date, score, and fitness level. This way when you bring up their name it shows only the most recent Record from the PT_Report table. Once I have the code I will use it in both queries and forms to do most of the interactions. But when I pull a person's name I want their most recent report on the form not all the records. The rest I can do using calculations, relationships, and so on.

    Thoughts?

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    In the query design window, select everything you want and turn on the aggregate function (the sigma sign). Leave everything at GroupBy but change the Test Date to "Max". That will give you the highest date for each DBPTID. You can then set the criteria for DBPTID to a form control and get just that one person.

  3. #3
    Madmax is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    80
    thank you, that is perfect!

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

Similar Threads

  1. Relationship Question on one-many
    By daveofgv in forum Database Design
    Replies: 2
    Last Post: 05-08-2011, 10:39 AM
  2. Table Relationship Question!
    By mbake085 in forum Access
    Replies: 5
    Last Post: 08-05-2010, 09:50 AM
  3. Structure/Relationship Question? Please Help...
    By Imgsolutions in forum Access
    Replies: 2
    Last Post: 06-27-2010, 09:52 PM
  4. Access Table - Relationship Question
    By vixtran in forum Database Design
    Replies: 5
    Last Post: 06-12-2009, 10:10 PM
  5. Access Relationship Display Question
    By dayrinni in forum Access
    Replies: 3
    Last Post: 02-05-2006, 11:16 AM

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