I have a form “MainForm1” and an embedded subform “SubFormCities”. The subform cities is not linked to the Main except through command buttons to filter the display. I have the subform designed to look like a list box. They are both linked to the same table. When I click on a certain field “Manager_Owner” in the subform I want the main form to go to that record as the current record. How can I do that. I currently send the ID info to a text box on the main form by by clicking the Manager_Owner field on the Subform triggering the following code:
Private Sub Manager_Owner_DblClick(Cancel As Integer)
Forms![MainForm1]![Text24] = Me.Manager_Owner.VALUE
Forms![MainCitiesForm1]![Text26] = Me.ID.VALUE
End Sub
And this works to send the info to the text boxes on the main form.
And I could write code to trigger an event on change of info in the ID text box to force the MainForm1 to go to the record with that ID. But I don’t know what code to write. There is probably and easier way to do this by somehow linking my main form to the subform but when I link my subform to the main form it only shows the one current record of the main form. So I unlink them and do it this way.
Your Thoughts? Thanks
Private Sub Manager_Owner_DblClick(Cancel As Integer)
Forms![MainForm1]![Text24] = Me.Manager_Owner.VALUE
Forms![MainCitiesForm1]![Text26] = Me.ID.VALUE
End Sub
And this works to send the info to the text boxes on the main form.
And I could write code to trigger an event on change of info in the ID text box to force the MainForm1 to go to the record with that ID. But I don’t know what code to write. There is probably and easier way to do this by somehow linking my main form to the subform but when I link my subform to the main form it only shows the one current record of the main form. So I unlink them and do it this way.
Your Thoughts? Thanks