Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Unanswered: Openform method to open form & its bound subform on specific record in another form


    I have tables with their PK’s:
    TblMeetings (MeetingsID)
    TblTopics (TopID)
    TblActions (ActioNID)
    TblActionOwners in successive one-to-many relationships.
    I have created a form of TblMeetings called FrmTblMeetings with successive subforms called FrmTblTopics & FrmTblActions.
    I have also created a form called FrmQryTblActionOwners from a query called QryTblActionOwners, which was created from the above tables, with a combobox called ActionOwners in the main form, and a sub form datasheet view of the rest of the fields of the query. (I can now see the actions per action owner)
    So in summary, I have two forms each with their subforms as described above, FrmTblMeetings for entering data and FrmQryTblActionOwners for viewing the data per action owner.
    Now selecting a record in sub form of FrmQryTblActionOwners causes the first form FrmTblMeetings to be opened using the OpenForm method with the record that was selected. This is all great up to this point…
    My problem is the FrmTblMeetings form opens on the correct record (MeetingsID), but the subform TblTopics record opens on the first record available with the lowest value for TopID. Somehow I need also (through the openform method?) to tell the opened FrmTblMeetings to tell its subform TblTopics to open on a specific record (TopID).
    To say it differently, Openform works well to open form on a specfic record, but I also need to specify its subform records as well?

    Hope I am making myself understood. Perhaps I am doing it all wrong in the first place?
    Edit/Delete Message

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    Generally you'd keep the subform in sync with the main form with the master/child link properties of the subform control. Is there a field common to both that would accomplish that?

  3. #3
    Join Date
    May 2009
    The master/child fields of the forms are already linked. Being one to many relationships, I have navigation buttons on each subform allowing me to step to the records as desired. Trick is to have the subform open on the desired record as was selected on the other form? If there is more than one possible record that has the same MeetingsID->TopID->ActionID then it chooses the record with the lowast ActionID value?

Posting Permissions

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