Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    New York

    Unanswered: Subforms link to Subforms

    Hi All!

    I have done this before so I know it's possible, I just don't have access to the old db's to see how i did it.

    On a form, I have 2 subforms that have no liink to the main form (it's a home page). One has all the coordinators, the other has all the kids. I need to be able to click on a coordinator and see the kids assigned to him/her. The coordinator is on both forms although by a different name (CoordinatorID and intProvider)

    Terri Gavin

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    In the recordsource query for the kids subform (make it a query if its not already), put in criteria in the query under the CoordinatorID column (or intProvider - whatever field links the 2 tables relationally):
    =Forms!MyMainFormName!MyFirstSubformName!Coordinat orID (I'd recommend making the "kids" subform continuous or also having a listbox with again, criteria in the rowsource query the same as above.)

    Make sure CoordinatorID is shown somewhere on the first subform (Coordinator subform). In that subform you then want to put in the OnCurrent event:


    or to requery a listbox on the kids subform

    Forms!MyMainFormName!MySecondSubformName!MyListBox FieldName.requery
    Last edited by pkstormy; 08-22-08 at 21:16.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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