Results 1 to 2 of 2
  1. #1
    Lunch is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    8

    Question Button problem for new entries using one-to-many relationship


    I’m creating a new database that has layered amounts of data. What I’m trying to do is build it so that can enter mother/child information on the same page. Users can then click a button for each child that opens up a second form that allows users to enter as many studies as that child participated in as needed. The problem I’m having is when there hasn’t been an entry for the child there is nothing to match on so the childid won’t populate and the childid entry ends up blank. I know if I used some sort of nested forms or update queries I could work my way around this but there is a better way. Thoughts?

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    You have 3 related tables Mother, Children and Studies, e.g.

    tbMothers
    PKMother
    txtMother

    tbChildren
    PKChild
    FKMother
    txtChild

    tbStudies
    PKStudy
    FKChild
    txtStudy

    tbMothers.PKMother is related 1 to many to tbChildren.FKMother
    tbChildren.PKChild is related 1 to many to tbStudies.FKChild

    Create theres relationaships if the Relationships window.

    Display the data in a Mothers form (parent), with a children subform (child), the children subform has a subsub form Studies (grandchild).

    Populate he forms in the following order parent, then child, then grandchild. If this order isn't utilized orphans without a preceding ancestor will be created.

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

Similar Threads

  1. most recent entries
    By tom4038 in forum Queries
    Replies: 0
    Last Post: 09-14-2009, 04:41 AM
  2. double booked entries
    By qbc in forum Access
    Replies: 3
    Last Post: 08-28-2009, 10:30 AM
  3. Relationship Problem
    By hawzmolly in forum Database Design
    Replies: 4
    Last Post: 07-18-2009, 05:39 PM
  4. Relationship problem?
    By amangill1984 in forum Access
    Replies: 0
    Last Post: 03-04-2009, 08:57 AM
  5. Normalisation and Relationship Problem
    By dromorkid in forum Database Design
    Replies: 3
    Last Post: 02-05-2009, 04:04 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