Tab from Subform to new record for the main form

Discussion in 'Microsoft Access Forms' started by ILoveAccess via AccessMonster.com, Jun 14, 2005.

  1. MainForm: "frmLeads"
    SubForm: "frmHistory"

    I've read other posts wanting to tab from the last record in the subform back
    to the main form, but the subform is my last entry before I want to start a
    whole new record for "frmLeads"

    How do I do this?

    Thanks!

    --
    Message posted via http://www.accessmonster.com
     
    ILoveAccess via AccessMonster.com, Jun 14, 2005
    #1
    1. Advertisements

  2. ILoveAccess via AccessMonster.com

    Guest Guest

    On the After update property of the sub form set the focus back to the field
    in the main form.
    forms![frmLeads]![FieldName].setfocus

    "ILoveAccess via AccessMonster.com" wrote:

    > MainForm: "frmLeads"
    > SubForm: "frmHistory"
    >
    > I've read other posts wanting to tab from the last record in the subform back
    > to the main form, but the subform is my last entry before I want to start a
    > whole new record for "frmLeads"
    >
    > How do I do this?
    >
    > Thanks!
    >
    > --
    > Message posted via http://www.accessmonster.com
    >
     
    Guest, Jun 14, 2005
    #2
    1. Advertisements

  3. I did what you suggested, but the curser still goes to the next record of the
    subform.

    --
    Message posted via http://www.accessmonster.com
     
    ILoveAccess via AccessMonster.com, Jun 20, 2005
    #3
  4. Try doing this
    Form!frm(Name)!(FieldName).SetFocus

    on Form Load
    FieldName.SetFocus
     
    Chirag Patel via AccessMonster.com, Jun 20, 2005
    #4
  5. ILoveAccess via AccessMonster.com

    Guest Guest

    It will move the focus only if you edit the records.
    If you want to move the focus to the field in the main form, regardless if
    you made an updates, then on the on exit property of the last field in the
    sub form, enter the code: Forms![MainFromname]![FieldName].setfocus

    "ILoveAccess via AccessMonster.com" wrote:

    > I did what you suggested, but the curser still goes to the next record of the
    > subform.
    >
    > --
    > Message posted via http://www.accessmonster.com
    >
     
    Guest, Jun 20, 2005
    #5
  6. The curser went to the main form like I need it to do, but I need the curser
    to go the the main form of a NEW record, so I can enter another record.

    --
    Message posted via http://www.accessmonster.com
     
    ILoveAccess via AccessMonster.com, Jun 21, 2005
    #6
  7. ILoveAccess via AccessMonster.com

    Guest Guest

    After the setfocus line anter the line

    DoCmd.GoToRecord acDataForm, Me.Parent.Name, acNewRec

    "ILoveAccess via AccessMonster.com" wrote:

    > The curser went to the main form like I need it to do, but I need the curser
    > to go the the main form of a NEW record, so I can enter another record.
    >
    > --
    > Message posted via http://www.accessmonster.com
    >
     
    Guest, Jun 21, 2005
    #7
  8. Awesome!!! It worked!

    Now, how do I move the curser from subform within a subform.

    Ex. I have a subform called "frmsubRTModelStorage" within another subform
    called "frmsubHistory" within the main form "frmLeads".

    I want to move the curser from "frmsubRTModelStorage.RtModel" to
    "frmsubHistory.LitSent"


    Thanks,

    I am leaving for the day, but will check the postings tomorrow. Thank you
    sooo much for all your help!

    --
    Message posted via http://www.accessmonster.com
     
    ILoveAccess via AccessMonster.com, Jun 21, 2005
    #8
  9. ILoveAccess via AccessMonster.com

    Guest Guest

    On the on exit of the field frmsubRTModelStorage.RtModel write the code

    Forms![frmLeads]![frmsubHistory].setfocus
    Forms![frmLeads]![frmsubHistory].form![LitSent].setfocus


    Ex. I have a subform called "frmsubRTModelStorage" within another subform
    called "frmsubHistory" within the main form "frmLeads".

    I want to move the curser from "frmsubRTModelStorage.RtModel" to
    "frmsubHistory.LitSent"



    "ILoveAccess via AccessMonster.com" wrote:

    > Awesome!!! It worked!
    >
    > Now, how do I move the curser from subform within a subform.
    >
    > Ex. I have a subform called "frmsubRTModelStorage" within another subform
    > called "frmsubHistory" within the main form "frmLeads".
    >
    > I want to move the curser from "frmsubRTModelStorage.RtModel" to
    > "frmsubHistory.LitSent"
    >
    >
    > Thanks,
    >
    > I am leaving for the day, but will check the postings tomorrow. Thank you
    > sooo much for all your help!
    >
    > --
    > Message posted via http://www.accessmonster.com
    >
     
    Guest, Jun 21, 2005
    #9
  10. ILoveAccess via AccessMonster.com, Jun 27, 2005
    #10
  11. ILoveAccess via AccessMonster.com

    Guest Guest

    Any time

    "ILoveAccess via AccessMonster.com" wrote:

    > Thank you ....it works great!
    >
    > --
    > Message posted via http://www.accessmonster.com
    >
     
    Guest, Jun 27, 2005
    #11
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob
    Replies:
    2
    Views:
    586
  2. Chips
    Replies:
    3
    Views:
    459
    Allen Browne
    May 2, 2004
  3. Guest
    Replies:
    0
    Views:
    392
    Guest
    Oct 5, 2004
  4. Guest

    Go To Main Form Record from selected subform record

    Guest, Dec 27, 2004, in forum: Microsoft Access Forms
    Replies:
    3
    Views:
    1,089
    Guest
    Dec 28, 2004
  5. Guest
    Replies:
    2
    Views:
    184
    Guest
    Jul 28, 2005
Loading...

Share This Page