A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SetFocus to field on new form - Access 2000



 
 
Thread Tools Display Modes
  #1  
Old August 21st, 2005, 07:58 AM
Abay
external usenet poster
 
Posts: n/a
Default SetFocus to field on new form - Access 2000

I have a multi-table Master/detail form. I would like to tab to the first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is) but it
escapes me .. any help would be much appreciated.

Thanks,
Abay


  #2  
Old August 21st, 2005, 03:16 PM
RuralGuy
external usenet poster
 
Posts: n/a
Default

On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is) but it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
  #3  
Old August 21st, 2005, 05:45 PM
Abay
external usenet poster
 
Posts: n/a
Default

Thank you for your reply, and please excuse my ignorance, but how do I do
that .. I have tried variations of the code below, but am not getting the
syntax? right. Am a bit of a newbie, only having the opportunity to use
Access now and again. My reference guide is "Using VB for Access97 Step by
Step", which goes through the basics. Any suggestions on other reference
manuals would be much appreciated as would some more help here.

Private Sub Info_AfterUpdate()
[FCldetail_SubForm.Status].SetFocus

Note "Info" is the last field on the master form, Status is the first field
on the sub form.

Thanks again,
Abay

RuralGuy wrote in message
...
On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is) but
it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



  #4  
Old August 21st, 2005, 07:26 PM
RuralGuy
external usenet poster
 
Posts: n/a
Default

You need to use the "Me" reference to begin with. Then you must set
the focus to the SubFormControl first. THis is *not* the SubForm but
the SubFormControl on the main form that displays the SubForm. Your
sequence will be something like:

Me.SubFormControl.SetFocus
Me.SubFormControl.Form.Status.SetFocus

You'll have to use your name for the SubFormControl. It does not have
to be the same name as the SubForm but usually is because most people
use the Wizard to add the SubForm and accept the defaults.

On Sun, 21 Aug 2005 09:45:49 -0700, "Abay" wrote:

Thank you for your reply, and please excuse my ignorance, but how do I do
that .. I have tried variations of the code below, but am not getting the
syntax? right. Am a bit of a newbie, only having the opportunity to use
Access now and again. My reference guide is "Using VB for Access97 Step by
Step", which goes through the basics. Any suggestions on other reference
manuals would be much appreciated as would some more help here.

Private Sub Info_AfterUpdate()
[FCldetail_SubForm.Status].SetFocus

Note "Info" is the last field on the master form, Status is the first field
on the sub form.

Thanks again,
Abay

RuralGuy wrote in message
.. .
On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is) but
it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
  #5  
Old August 21st, 2005, 08:23 PM
Abay
external usenet poster
 
Posts: n/a
Default

Thank you again .. I did the following without success:

Private Sub Info_Exit(Cancel As Integer)

Me.Cname.SetFocus .. this works fine
Me.Cname.FCldetail_subform.Status.SetFocus .. this obviously gives an
error, except it's not obvious to me.. unfortunately

End Sub

This produces the error: "Method or data member not found"

Note: I did use the Wizard .. Cname is the link (I assume that is the
Control you reference) between the two forms and the detail form is called
FCldetail_subform

I feel really frustrated with my ignorance, & apologies for same. I'll have
no hair left if I don't get it right soon!

Abay


RuralGuy wrote in message
...
You need to use the "Me" reference to begin with. Then you must set
the focus to the SubFormControl first. THis is *not* the SubForm but
the SubFormControl on the main form that displays the SubForm. Your
sequence will be something like:

Me.SubFormControl.SetFocus
Me.SubFormControl.Form.Status.SetFocus

You'll have to use your name for the SubFormControl. It does not have
to be the same name as the SubForm but usually is because most people
use the Wizard to add the SubForm and accept the defaults.

On Sun, 21 Aug 2005 09:45:49 -0700, "Abay" wrote:

Thank you for your reply, and please excuse my ignorance, but how do I do
that .. I have tried variations of the code below, but am not getting the
syntax? right. Am a bit of a newbie, only having the opportunity to use
Access now and again. My reference guide is "Using VB for Access97 Step
by
Step", which goes through the basics. Any suggestions on other reference
manuals would be much appreciated as would some more help here.

Private Sub Info_AfterUpdate()
[FCldetail_SubForm.Status].SetFocus

Note "Info" is the last field on the master form, Status is the first
field
on the sub form.

Thanks again,
Abay

RuralGuy wrote in message
. ..
On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the
first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field
on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is)
but
it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



  #6  
Old August 21st, 2005, 11:26 PM
RuralGuy
external usenet poster
 
Posts: n/a
Default

Add 1 more Form to this: Me.Cname.FCldetail_subform.Status.SetFocus
so it becomes : Me.Cname.FCldetail_subform.Form.Status.SetFocus

On Sun, 21 Aug 2005 12:23:20 -0700, "Abay" wrote:

Thank you again .. I did the following without success:

Private Sub Info_Exit(Cancel As Integer)

Me.Cname.SetFocus .. this works fine
Me.Cname.FCldetail_subform.Status.SetFocus .. this obviously gives an
error, except it's not obvious to me.. unfortunately

End Sub

This produces the error: "Method or data member not found"

Note: I did use the Wizard .. Cname is the link (I assume that is the
Control you reference) between the two forms and the detail form is called
FCldetail_subform

I feel really frustrated with my ignorance, & apologies for same. I'll have
no hair left if I don't get it right soon!

Abay


RuralGuy wrote in message
.. .
You need to use the "Me" reference to begin with. Then you must set
the focus to the SubFormControl first. THis is *not* the SubForm but
the SubFormControl on the main form that displays the SubForm. Your
sequence will be something like:

Me.SubFormControl.SetFocus
Me.SubFormControl.Form.Status.SetFocus

You'll have to use your name for the SubFormControl. It does not have
to be the same name as the SubForm but usually is because most people
use the Wizard to add the SubForm and accept the defaults.

On Sun, 21 Aug 2005 09:45:49 -0700, "Abay" wrote:

Thank you for your reply, and please excuse my ignorance, but how do I do
that .. I have tried variations of the code below, but am not getting the
syntax? right. Am a bit of a newbie, only having the opportunity to use
Access now and again. My reference guide is "Using VB for Access97 Step
by
Step", which goes through the basics. Any suggestions on other reference
manuals would be much appreciated as would some more help here.

Private Sub Info_AfterUpdate()
[FCldetail_SubForm.Status].SetFocus

Note "Info" is the last field on the master form, Status is the first
field
on the sub form.

Thanks again,
Abay

RuralGuy wrote in message
...
On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the
first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field
on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is)
but
it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.


_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
  #7  
Old August 22nd, 2005, 12:59 AM
RuralGuy
external usenet poster
 
Posts: n/a
Default

I just noticed the other error. Here's the two lines of code you
need:

Me!FCldetail_subform.SetFocus
Me!FCldetail_subform.Form!Status.SetFocus

Copy it exactly as written and try it.

On Sun, 21 Aug 2005 12:23:20 -0700, "Abay" wrote:

Thank you again .. I did the following without success:

Private Sub Info_Exit(Cancel As Integer)

Me.Cname.SetFocus .. this works fine
Me.Cname.FCldetail_subform.Status.SetFocus .. this obviously gives an
error, except it's not obvious to me.. unfortunately

End Sub

This produces the error: "Method or data member not found"

Note: I did use the Wizard .. Cname is the link (I assume that is the
Control you reference) between the two forms and the detail form is called
FCldetail_subform

I feel really frustrated with my ignorance, & apologies for same. I'll have
no hair left if I don't get it right soon!

Abay


RuralGuy wrote in message
.. .
You need to use the "Me" reference to begin with. Then you must set
the focus to the SubFormControl first. THis is *not* the SubForm but
the SubFormControl on the main form that displays the SubForm. Your
sequence will be something like:

Me.SubFormControl.SetFocus
Me.SubFormControl.Form.Status.SetFocus

You'll have to use your name for the SubFormControl. It does not have
to be the same name as the SubForm but usually is because most people
use the Wizard to add the SubForm and accept the defaults.

On Sun, 21 Aug 2005 09:45:49 -0700, "Abay" wrote:

Thank you for your reply, and please excuse my ignorance, but how do I do
that .. I have tried variations of the code below, but am not getting the
syntax? right. Am a bit of a newbie, only having the opportunity to use
Access now and again. My reference guide is "Using VB for Access97 Step
by
Step", which goes through the basics. Any suggestions on other reference
manuals would be much appreciated as would some more help here.

Private Sub Info_AfterUpdate()
[FCldetail_SubForm.Status].SetFocus

Note "Info" is the last field on the master form, Status is the first
field
on the sub form.

Thanks again,
Abay

RuralGuy wrote in message
...
On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the
first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field
on
the master.

I have tried to set focus to the first field on the detail form with no
success. It seems it should be an easy thing to do (and probably is)
but
it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.


_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
  #8  
Old August 22nd, 2005, 01:16 AM
Abay
external usenet poster
 
Posts: n/a
Default

Eureka it works!

Many many thanks for your continued help .. very much appreciated

Abay

RuralGuy wrote in message
...
I just noticed the other error. Here's the two lines of code you
need:

Me!FCldetail_subform.SetFocus
Me!FCldetail_subform.Form!Status.SetFocus

Copy it exactly as written and try it.

On Sun, 21 Aug 2005 12:23:20 -0700, "Abay" wrote:

Thank you again .. I did the following without success:

Private Sub Info_Exit(Cancel As Integer)

Me.Cname.SetFocus .. this works fine
Me.Cname.FCldetail_subform.Status.SetFocus .. this obviously gives an
error, except it's not obvious to me.. unfortunately

End Sub

This produces the error: "Method or data member not found"

Note: I did use the Wizard .. Cname is the link (I assume that is the
Control you reference) between the two forms and the detail form is called
FCldetail_subform

I feel really frustrated with my ignorance, & apologies for same. I'll
have
no hair left if I don't get it right soon!

Abay


RuralGuy wrote in message
. ..
You need to use the "Me" reference to begin with. Then you must set
the focus to the SubFormControl first. THis is *not* the SubForm but
the SubFormControl on the main form that displays the SubForm. Your
sequence will be something like:

Me.SubFormControl.SetFocus
Me.SubFormControl.Form.Status.SetFocus

You'll have to use your name for the SubFormControl. It does not have
to be the same name as the SubForm but usually is because most people
use the Wizard to add the SubForm and accept the defaults.

On Sun, 21 Aug 2005 09:45:49 -0700, "Abay" wrote:

Thank you for your reply, and please excuse my ignorance, but how do I
do
that .. I have tried variations of the code below, but am not getting
the
syntax? right. Am a bit of a newbie, only having the opportunity to use
Access now and again. My reference guide is "Using VB for Access97 Step
by
Step", which goes through the basics. Any suggestions on other
reference
manuals would be much appreciated as would some more help here.

Private Sub Info_AfterUpdate()
[FCldetail_SubForm.Status].SetFocus

Note "Info" is the last field on the master form, Status is the first
field
on the sub form.

Thanks again,
Abay

RuralGuy wrote in message
m...
On Sat, 20 Aug 2005 23:58:07 -0700, "Abay" wrote:

I have a multi-table Master/detail form. I would like to tab to the
first
field on the detail form from the last field on the Master, which was
working .. but now when I tab from the last field on the Master after
tabbing 4 times (going nowhere) the focus goes back to the first field
on
the master.

I have tried to set focus to the first field on the detail form with
no
success. It seems it should be an easy thing to do (and probably is)
but
it
escapes me .. any help would be much appreciated.

Thanks,
Abay


You must set the focus to the SubFormControl on the main form first
before setting the focus to a control on the SubForm.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.


_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form, Subform, Tab key 2nd_Stage_User Using Forms 17 August 25th, 2006 12:30 AM
Ambiguous Name Error pm Using Forms 10 June 5th, 2005 09:19 PM
2002 vs 2003 Patrick Stubbin General Discussion 2 May 17th, 2005 07:27 AM
Images in a database Franz General Discussion 10 October 7th, 2004 09:35 AM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM


All times are GMT +1. The time now is 08:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.