Tab from Subform to new record for the main form

  • Thread starter Thread starter ILoveAccess via AccessMonster.com
  • Start date 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!
 
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 did what you suggested, but the curser still goes to the next record of the
subform.
 
Try doing this
Form!frm(Name)!(FieldName).SetFocus

on Form Load
FieldName.SetFocus
 
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
 
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.
 
After the setfocus line anter the line

DoCmd.GoToRecord acDataForm, Me.Parent.Name, acNewRec
 
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!
 
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"
 
Back
Top