Results 1 to 3 of 3
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Move Focus From Subform To Main Form

    DatePaid on subform OrdersPaymentSub set focus on form OrderDetails CustomerID

    When user tabs to this final field, on the subform, how can I make it go back to the main form?


    Control on subform is named DatePaid , what event should I use and from where?
    Control on main form is named CustomerID

    1. Main form is named OrderDetails
    2. Subform is named OrdersPaymentSub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not something I've done.

    Is the subform in Datasheet or Continuous views?

    Google: access vba set focus on main form from subform

    Here is one idea:
    http://stackoverflow.com/questions/1...m-to-main-form

    I think this is easier in Single view with Cycle property set to CurrentRecord. Then could try the Exit or LostFocus event of the last control.
    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
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2002
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Pretty Cool, The F6 key did the trick, Thanks, Here is my code that worked for me.
    Select Case KeyCode

    Case vbKeyF6
    Me.Parent.[CustomerID].SetFocus
    DoCmd.GoToControl "CustomerID"
    End Select

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

Similar Threads

  1. Replies: 3
    Last Post: 10-09-2012, 11:58 PM
  2. Replies: 8
    Last Post: 08-26-2012, 11:11 PM
  3. Replies: 2
    Last Post: 06-26-2012, 10:54 PM
  4. Replies: 1
    Last Post: 02-29-2012, 09:38 AM
  5. Replies: 11
    Last Post: 01-26-2012, 01:22 PM

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