Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Posts
    7

    SubForm to Parent


    Is there a way to move from a field in a subform to a field in its parent using code and or a keyboard combination?

    I have tried using code for setfocus and the gotocontrol.

    I want to be able to save and goto a new record on the parent form when I complete my entries on the subform, without having to use the navigation bar.

  2. #2
    Join Date
    Nov 2006
    Location
    Arlington Heights, IL
    Posts
    7
    When you tried the Set Focus command what happened? When you are on the subform you have to refer back to the Parent Form in the proper format (Forms![ParentFormName].Command?) to have the code work. Would this following code work?

    Forms![ParentFormName].SetFocus
    DoCmd.GoToRecord , , acNewRec

    Thanks,
    ScottG

  3. #3
    Join Date
    Oct 2006
    Posts
    7

    Not Working

    Quote Originally Posted by ScottG
    When you tried the Set Focus command what happened? When you are on the subform you have to refer back to the Parent Form in the proper format (Forms![ParentFormName].Command?) to have the code work. Would this following code work?

    Forms![ParentFormName].SetFocus
    DoCmd.GoToRecord , , acNewRec

    Thanks,
    ScottG
    No! I'm having to use the mouse to get the focus back to the parent form. I've tried putting code in the LostFocus property from the last control on the subform, but it doesn't work. If I can get focus to goto the parent form from the subform I know how to get the rest of my code.

    Thanks

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

Similar Threads

  1. SubForms to Parent
    By henryclay in forum Forms
    Replies: 2
    Last Post: 10-27-2006, 07:14 AM
  2. Replies: 1
    Last Post: 12-10-2005, 04:52 PM
  3. Subform in a Subform and relationships
    By St3ph3n in forum Database Design
    Replies: 3
    Last Post: 12-06-2005, 06:34 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