Syncing tabbed forms

  • Thread starter Thread starter John Thomas
  • Start date Start date
J

John Thomas

I have a Tabbed form with the main control form that I use on one tab which
is called, View 1, when I click on another tab I want it to go to the
current recod on that View 1 form. Now, within the View 1 form itself, I use
the following code to keep the different subforms on it in sync, but it does
not work on the other tab when I click on it.

'Form1 is the name of the subform on the new tab I want to have in sycn with
the View 1 form on the other tab. Thank you for any help on this.

Private Sub Form1_Enter()
Dim var1 As Variant
var1 = Form.CurrentRecord
DoCmd.GoToRecord , , acGoTo, var1

End Sub
 
John,

On the View 1 form, click on each subform control and set the LinkMaster and
LinkChild properties. You won't need the code anymore! Then go to the new tab
and do the same thing. This will keep the subform on the new tab in sync with
View 1!
 
That is ok for the the standard sunforms, but i have controls that on both
tabs that do not have that property, such as activex treeview and rich text
controls that need to be told where they are. They exist on both tabs, so i
need to hard code it. Thanks though, i wish that was an option for me.
John Thomas
 
Back
Top