Results 1 to 5 of 5
  1. #1
    Join Date
    May 2004
    Posts
    63

    Exclamation Unanswered: Subform to Mainform

    I have "frmCust" as main form and "frmOrder" as Subform. I would like to set focus back to my "frmCust" txtCustID...when user is on the last field of the subfrorm.

    "frmOrder" has "txtComments" as last field as soon as user hits tab on "txtComments" i would like to set the focus back to "frmCust" txtCustID"


  2. #2
    Join Date
    Oct 2003
    Posts
    66
    Try this, in the LostFocus event for txtcomments put code to setfocus to your customer field on the main form. i think you will have to use Form_formname.fieldname.SetFocus since it is on different form.

  3. #3
    Join Date
    May 2004
    Posts
    63
    This works fine but as soon as "txtCustID" gets focus my subform is blank

  4. #4
    Join Date
    May 2004
    Location
    Salt Lake City, UT USA
    Posts
    4

    Going to next record could be problem

    Depending on how you've got your subform set up, could it be that when you are hitting 'Tab' from the last field in your subform that it is moving to the next record? Try setting the subform's "Cycle" property to current record and see what happens. Just stabbing in the dark here - haven't tried it.

  5. #5
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    I use a macro on the subform

    SelectObject
    MainForm
    GoToControl
    Desired field in the main form

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •