Results 1 to 4 of 4
  1. #1
    BLFOSTER is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2013
    Posts
    68

    Working with Tab Controls

    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?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    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.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by BLFOSTER View Post

    ...How do I reference that text box on the tab control...
    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)>

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Working with Subform controls
    By dweekley in forum Access
    Replies: 3
    Last Post: 05-05-2017, 10:23 AM
  2. Puzzled - Form controls stop working
    By vad77 in forum Access
    Replies: 6
    Last Post: 03-31-2014, 10:21 AM
  3. Working with objects on tab controls
    By accessnewbie in forum Access
    Replies: 6
    Last Post: 03-19-2013, 02:26 PM
  4. Assigning controls not working
    By SemiAuto40 in forum Programming
    Replies: 5
    Last Post: 10-20-2011, 06:53 PM
  5. Replies: 1
    Last Post: 09-28-2009, 05:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums