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

Mikkel

Registered User.
Local time
Today, 11:04
Joined
Oct 19, 2007
Messages
18
Openform method to open form & its bound subform on specific record in another form

Hi - All went well, I successfully can launch a 1st form from another 2nd form using a macro containing openform method attached the 'on current' event of the 2nd form. So clicking on a record in the 2nd form launches the first form with the 2nd forms record.
I need the records of the 1st form's subforms to also go to the corresponding records specified in the 2nd form. Both forms are identical and have one to many subform relationships
 
Re: Openform method to open form & its bound subform on specific record in another fo

Hard to follow what you are trying to do but it sounds like you need to link the 1st subform to the 1st mainform.
Set the Link Master Fields and Link Child Fields properties of the subform control on the mainform.

When the new record appears in the mainform the subform should follow it.
 
Re: Openform method to open form & its bound subform on specific record in another fo

Let me try again…
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?
 

Users who are viewing this thread

Back
Top Bottom