Results 1 to 4 of 4
  1. #1
    SpdRacerX is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    40

    Pre-set Number of Records in Table based off another Table


    I need to have a pre-set number of records in a table or query based off another table.

    For instance a patient comes into the hospital, he/she must have 4 follow-up appointments.

    How can I set this up?

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    How can I set this up?
    You wouldn't. Having a table with duplicate data violates normalization rules

    You just need a query with a subquery to pull the 4 most recent record for each patient.

    This site shows an example of how to do it. Look for the header:
    TOP n records per group

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    jzwp11, I think OP wants to pre-establish appointment records based on the patient ID. Why they don't just manually enter 4 appointment records is the question. I suspect a form/subform arrangement is needed.

    SpdRacerX, are you entering data directly into tables? Recommend use forms for data entry interface.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    June7, it does look like I misread the post. Thanks

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

Similar Threads

  1. Sub form based on table select specific records
    By ReluctantGeek in forum Forms
    Replies: 0
    Last Post: 01-21-2012, 11:24 AM
  2. Replies: 4
    Last Post: 04-18-2011, 07:18 AM
  3. Sequentially number records in a table field
    By kenton.l.sparks@gmail.com in forum Programming
    Replies: 4
    Last Post: 04-08-2011, 08:24 PM
  4. Replies: 2
    Last Post: 10-27-2009, 07:09 AM
  5. Replies: 1
    Last Post: 01-31-2009, 10:43 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