PC Review


Reply
Thread Tools Rate Thread

Tab from Subform to new record for the main form

 
 
ILoveAccess via AccessMonster.com
Guest
Posts: n/a
 
      14th Jun 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      14th Jun 2005
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
>

 
Reply With Quote
 
 
 
 
ILoveAccess via AccessMonster.com
Guest
Posts: n/a
 
      20th Jun 2005
I did what you suggested, but the curser still goes to the next record of the
subform.

--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
Chirag Patel via AccessMonster.com
Guest
Posts: n/a
 
      20th Jun 2005
Try doing this
Form!frm(Name)!(FieldName).SetFocus

on Form Load
FieldName.SetFocus
 
Reply With Quote
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      20th Jun 2005
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
>

 
Reply With Quote
 
ILoveAccess via AccessMonster.com
Guest
Posts: n/a
 
      21st Jun 2005
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
 
Reply With Quote
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      21st Jun 2005
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
>

 
Reply With Quote
 
ILoveAccess via AccessMonster.com
Guest
Posts: n/a
 
      21st Jun 2005
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
 
Reply With Quote
 
=?Utf-8?B?T2Zlcg==?=
Guest
Posts: n/a
 
      21st Jun 2005
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
>

 
Reply With Quote
 
ILoveAccess via AccessMonster.com
Guest
Posts: n/a
 
      27th Jun 2005
Thank you ....it works great!

--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Requery main form after subform update and not lose place in main form. Michael Microsoft Access Form Coding 1 23rd Nov 2010 10:26 PM
Double click record in subform to go to new record in Main (and subform) Jpipher@gmail.com Microsoft Access 14 3rd Feb 2007 08:06 AM
Main form is creating new record for each record in subform... =?Utf-8?B?RE1M?= Microsoft Access Forms 0 5th Oct 2004 08:25 PM
=> Open Subform on Main Form initiated by button on Main Form Rhonda Fischer Microsoft Access Form Coding 1 8th Dec 2003 06:08 PM
form / subform - problem adding new record! - can't save main record Bob Microsoft Access Forms 2 7th Oct 2003 06:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:19 PM.