Results 1 to 3 of 3
  1. #1
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32

    Focus on subforum page

    Hi,
    I have 4 subforums (A, B, C, D) in one "MENU". When I go to "C", then there is a button, that is linked to another form (E), when I press the button the Form "C" is closed and new form is opened (form E)m I'm using that:

    Code:
        DoCmd.OpenForm "f_produkti_print_filter"
            DoCmd.Close acForm, "Menu"
    So when I'm finish with that new form (E), I press the button, the current is closed and "Menu"is opened, but it's opened in "A", not in "C" how I expected and want.



    Code:
        DoCmd.OpenForm "Menu"
            DoCmd.Close acForm, "f_produkti_print_filter"

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    When you reopen the Menu form, focus is set on first control in the form's TabOrder, which is apparently subform A container control. If you want to return to subform C after form E then must not close Menu or reset focus to subform C, something like:

    DoCmd.OpenForm "Menu"
    Forms!Menu.subformC.SetFocus
    DoCmd.Close acForm, "f_produkti_print_filter"
    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
    rumenrs is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    32
    Wow, Thank you!!!

    It's simple and easy and works!

    Thank you

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

Similar Threads

  1. Replies: 1
    Last Post: 03-05-2013, 06:38 PM
  2. Replies: 1
    Last Post: 11-21-2012, 08:18 AM
  3. Set Focus to subfrm on Tabbed Page
    By libraccess in forum Forms
    Replies: 3
    Last Post: 06-30-2012, 07:44 AM
  4. Page break on report inserts empty page between
    By Galadrielle in forum Reports
    Replies: 0
    Last Post: 07-07-2010, 04:18 AM
  5. Replies: 1
    Last Post: 05-22-2010, 08:30 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