Results 1 to 6 of 6
  1. #1
    Swarland is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Location
    Northumberland, UK
    Posts
    16

    Getting to a tab on openform

    My db starts by checking if any user ToDo's are overdue - when they are a form gives the user the ability to go to the ToDo parent form.



    The ToDo form is a subform on tab 2 of the parent form - but how do I address the subform in a docmd.openform instruction?

    Any help always appreciated.

    regards

    Roger

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I take it this is not always the way you want to open this form or the SubForm. How about passing instructions or codes to the next form in the OpenArgs argument of the OpenForm command and executing the instructions in the OnLoad event of the next form?

  3. #3
    Swarland is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Location
    Northumberland, UK
    Posts
    16
    When the db is opened up it runs a macro that opens a form (AlertForm) using a query to check for overdue tasks, these are shown in order on the AlertForm, which is a continuous form with record selectors. When the user then selects one of the overdue records shown, it opens the ProjectForm which has a 5-tab control (tabctl14) - the Todo tab is number 2 (named ToDo List) and contains a subform (Project_todoList). This ProjectForm is used within the normal programme and is opened by the ClientMain form if the user requires it.

    I am unsure what you mean by "How about passing instructions or codes to the next form in the OpenArgs argument of the OpenForm command and executing the instructions in the OnLoad event of the next form?".

    I did start out with the first loaded form opening the AlertForm via the onload event, but the AlertForm was always behind the main form and unseen and I cannot hide a form opened by the user as the .visible option isn't available. Perhaps this is what you are suggesting above, but, I would still have the same problem, opening the correct tab of the ProjectForm.

    However, I am happy with the way the Alerts now work, but I would like the ProjectForm to load and open onto the ToDo Tab, rather than just the first tab. This is what I am unable to achieve at the moment, because I don't know how to address the subForm on the tabctl14 tab2 - if indeed it is possible.

    Regards

    Roger

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You can select the 2nd tab by simply putting the focus on a Control that is located on the 2nd tab.

  5. #5
    Swarland is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2010
    Location
    Northumberland, UK
    Posts
    16
    Once again RuralGuy you have come up trumps, many thanks.

    Regards

    Roger

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Ahh...another satisfied customer!

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

Similar Threads

  1. OpenForm in subform not working
    By eyuen in forum Forms
    Replies: 3
    Last Post: 11-10-2010, 12:03 PM
  2. OpenForm macro
    By tguckien in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 09:12 AM
  3. Passing Data with OpenForm
    By nkenney in forum Forms
    Replies: 1
    Last Post: 10-26-2009, 11:40 AM
  4. DoCmd.OpenForm Modification
    By alsoto in forum Forms
    Replies: 6
    Last Post: 05-01-2009, 07:28 AM
  5. OpenForm Action and Arguments
    By nkenney in forum Forms
    Replies: 9
    Last Post: 04-05-2009, 09:33 AM

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