Results 1 to 2 of 2
  1. #1
    rivereridanus is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    71

    OpenForm to specific tab

    Hi everyone,

    I have an input form that opens another second input form. The code below opens the form to the correct record.
    However, the form that I open has a bunch of tabs on it, and I want to open the specific record right to the tab "Technology_Page". Does anyone know a way that I might be able to do that right from this statement?



    Code:
     DoCmd.OpenForm "ProjectDetailsActive", acNormal, , "PPID = " & Me!PPID

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Can't. Not directly. Use the OpenArgs argument of that line to send value to the form. Then in the Open event of form set the active tab page. Example:

    DoCmd.OpenForm "ProjectDetailsActive", acNormal, , "PPID = " & Me!PPID, , , "TP"

    Then in Open event:

    If Me.OpenArgs = "TP"
    Me.tabcontrolname.pagename.SetFocus
    End If

    If Technology_Page is the name (not the caption) of the tab page then use it in place of 'pagename'.
    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. Replies: 1
    Last Post: 06-15-2012, 05:51 PM
  2. OpenForm by Check Box False
    By ggs in forum Forms
    Replies: 11
    Last Post: 10-04-2011, 01:16 AM
  3. What actually happens at docmd.openform
    By Beorn in forum Programming
    Replies: 4
    Last Post: 01-05-2011, 02:19 PM
  4. Getting to a tab on openform
    By Swarland in forum Programming
    Replies: 5
    Last Post: 12-12-2010, 11:22 AM
  5. OpenForm macro
    By tguckien in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 09:12 AM

Tags for this Thread

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