Talk About Network

Google





Software > Access Forms > Re: How to set ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 44639 of 46786
Post > Topic >>

Re: How to set Subform Default Focus

by "Mark A. Sam" <MarkASam@[EMAIL PROTECTED] > Aug 13, 2008 at 07:41 AM

Rosemary,

To set the subform to go to a new record, first set the focus on the
subform 
control then use the GoToRecord method.  I don't know the macro syntax,
but 
the VBA methods are below.

[SubformName].SetFocus
DoCmd.GoToRecord , , acNewRec

Do the same to go to a previous record. First set the focus on the subform

control.

God Bless,

Mark A. Sam


"Rosemary" <Rosemary@[EMAIL PROTECTED]
> wrote in message 
news:038DA9C9-E66B-41FA-B0B3-34385E362CEB@[EMAIL PROTECTED]
>I have a main form with a subform. The main form contains only displayed
> data; i.e., no control gets the focus. What I want to do is to set the 
> focus
> on the subform to the "new" record. I have tried setting the Current
event 
> on
> the subform (macro: GOTORECORD,,NEW) and it doesn't work correctly. It 
> does
> set the focus correctly when the subform is initially displayed.
However,
> when I try to change the focus to a previous record, the focus 
> automatically
> is reset to the "new" record. I have tried other events but none of them

> seem
> to work. I even tried setting an event in the Main form, but I get an 
> error
> message stating that the subform isn't opened(?). I also want this to
work
> whenever I access the next "main form" record.
>
> Your help is greatly appreciated. Thanks in advance.
 




 2 Posts in Topic:
How to set Subform Default Focus
=?Utf-8?B?Um9zZW1hcnk=?=   2008-08-06 14:55:02 
Re: How to set Subform Default Focus
"Mark A. Sam" &  2008-08-13 07:41:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 14:57:32 PST 2009.