Tab from Subform to new record for the main form

  • Thread starter ILoveAccess via AccessMonster.com
  • Start date
I

ILoveAccess via AccessMonster.com

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!
 
G

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
 
I

ILoveAccess via AccessMonster.com

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

Chirag Patel via AccessMonster.com

Try doing this
Form!frm(Name)!(FieldName).SetFocus

on Form Load
FieldName.SetFocus
 
G

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
 
I

ILoveAccess via AccessMonster.com

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.
 
G

Guest

After the setfocus line anter the line

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

ILoveAccess via AccessMonster.com

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!
 
G

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"
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top