I have 2 forms containing tab controls. I want to open the second form that contains a tab control to the same record ID as the record on the first form with tab control. How do I reference that text box on the tab control?
I have 2 forms containing tab controls. I want to open the second form that contains a tab control to the same record ID as the record on the first form with tab control. How do I reference that text box on the tab control?
What method are you using to open the second form? VBA could be like:
DoCmd.Open "form name", , , "somefield = " & Me.controlname
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
That depends; is this Textbox on a Subform on the Tabbed Control page?
Or is it simply a Control that is Bound to a Field in the Form's Record Source?
If the former
[Forms]![MainFormName]![SubFormName].Form![ControlName]
where SubFormName being name of the Subform Control, not the name of the Form object it is holding.
If the latter, you refer to it as if if were simply a Control on the main part of the Form...the Tabbed Control Page doesn't come into it.
Linq ;0)>
I made assumption the textbox is not within a subform.
Also assumes the record you want to open to is in RecordSource of main form, not a subform.
In other words, tab controls are irrelevant to the referencing of other controls. What is important is whether or not subforms are involved.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.