Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    subform linking problem (2000-SR1)

    I have a form "Student Info" with a subform "Family Info" (plus another subform called "Scores"). The user enters demographic data for the student, then the family. They are related by a "FamilyID" field. The Student Info form has a combo box with SQL to list the name and ID of each family to select it in order to tie them together. But the newly entered family data (in the "Family Info" subform) do not show up in the SQL for the combo box on the Student Info form. I have tried manually refreshing the records to no avail. The new family records only show up in the SQL if I manually enter the FamilyID number in the combo box and then refresh. Does that make any sense to anyone?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: subform linking problem (2000-SR1)

    Assuming that a student belongs to only one family, I would do it the other way round: a main form based on the Family Info table, with a subform based on the Student Info table, linked by FamilyID through the Link Master Fields and Link Child Fields properties of the subform. When you enter a new student, the appropriate FamilyID will automatically be filled in.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2005
    Location
    Wichita, Kansas, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subform linking problem (2000-SR1)

    How does that work in the process of data entry? If a new student is being entered, and the new demographics for the parent at the same time, how do they get linked? The FamilyID is an AutoNumber Field. Logically, since it is a classroom, the primary focus is the student, so the student data would typically be entered first.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: subform linking problem (2000-SR1)

    You could use a form based on the students table, without a subform for the family table (that doesn't make sense).
    Set the Limit to List property of the combo box for FamilyID to Yes, and use the On Not In List event to add new families.
    See (for example) the thread starting at <post:=146,627>post 146,627</post:> for examples of code using NotInList.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •