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  

Need Code to tab out of subform



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2006, 11:25 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default Need Code to tab out of subform

I have just made some cosmetic changes to my subform. To get the effects of
the change, I had to change my views from Database to Continuous Forms. My
problem is: When I am done entering Equipment in the subform, I can't tab out
of it to go on to an item on the main form like I could before in Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am new to
this. Thanks for any help.
  #2  
Old December 17th, 2006, 12:40 AM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 20
Default Need Code to tab out of subform


Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the effects of
the change, I had to change my views from Database to Continuous Forms. My
problem is: When I am done entering Equipment in the subform, I can't tab out
of it to go on to an item on the main form like I could before in Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am new to
this. Thanks for any help.


In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.

Me![mainfom]![thefield you want to go to].setfocus

THat should point you to the field you want when the last field on the
subform exist.

GL.

  #3  
Old December 17th, 2006, 12:41 AM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 20
Default Need Code to tab out of subform


Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the effects of
the change, I had to change my views from Database to Continuous Forms. My
problem is: When I am done entering Equipment in the subform, I can't tab out
of it to go on to an item on the main form like I could before in Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am new to
this. Thanks for any help.


In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.

Me![mainfom]![name of the field you want to go to].setfocus

THat should point you to the field you want when the last field on the
subform exist.

GL.

  #4  
Old December 17th, 2006, 01:45 AM posted to microsoft.public.access.forms
tina
external usenet poster
 
Posts: 1,997
Default Need Code to tab out of subform

you could add code to the Exit event procedure of the last control (in the
tab order) of the subform to SetFocus back to a control in the main form, as

Me.Parent!MainFormControlName.SetFocus

replace MainFormControlName with the correct name of the control on the main
form that you want the cursor to "land" in.

but, if you do this, the user won't be able to easily add multiple records
to the subform at one time, because the code will keep kicking the focus out
of the subform into the main form. as an alternative, you might want to set
a hot key to the main form control the user will want to move to - by
"underlining" a letter in the control label's caption. you do this by adding
an ampersand (&) immediately before the letter in the Caption property. for
example, the following caption property in a control's label, as

&First Name

will underline the F in Form view, and the user can jump to that control by
pressing Shift+f.

having set up a hot key, you'd need to train your users to use it to get
back to the main form. to an experienced data entry operator, this method
quickly becomes second nature, and is much quicker than using the mouse to
click into the desired field.

hth


wrote in message
ups.com...

Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the effects

of
the change, I had to change my views from Database to Continuous Forms.

My
problem is: When I am done entering Equipment in the subform, I can't

tab out
of it to go on to an item on the main form like I could before in

Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am new

to
this. Thanks for any help.


In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.

Me![mainfom]![thefield you want to go to].setfocus

THat should point you to the field you want when the last field on the
subform exist.

GL.



  #5  
Old December 17th, 2006, 02:41 AM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default Need Code to tab out of subform

Thanks to you and Tina.
This gets me out of the subform ok, but before I'm through entering items.
After I'm through, I need to go to the next record in the subform and just
tab across to the last field. If it's blank or "0", then it takes me out of
the subform. I hope this makes sense. I didn't explain it very well before.
" wrote:


Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the effects of
the change, I had to change my views from Database to Continuous Forms. My
problem is: When I am done entering Equipment in the subform, I can't tab out
of it to go on to an item on the main form like I could before in Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am new to
this. Thanks for any help.


In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.

Me![mainfom]![name of the field you want to go to].setfocus

THat should point you to the field you want when the last field on the
subform exist.

GL.


  #6  
Old December 17th, 2006, 09:25 AM posted to microsoft.public.access.forms
tina
external usenet poster
 
Posts: 1,997
Default Need Code to tab out of subform

well, here's another alternative that may work for you. in the subform, in
the last control's Exit event procedure, add the following code, as

If Me.NewRecord Then Me.Parent!ControlName.SetFocus

the above goes all on one line in the procedure, regardless of how the
newreader may wrap it here. replace ControlName with the correct name of the
control on the main form that you want the cursor to "land" in.

hth


"Ron Weaver" wrote in message
...
Thanks to you and Tina.
This gets me out of the subform ok, but before I'm through entering items.
After I'm through, I need to go to the next record in the subform and just
tab across to the last field. If it's blank or "0", then it takes me out

of
the subform. I hope this makes sense. I didn't explain it very well

before.
" wrote:


Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the

effects of
the change, I had to change my views from Database to Continuous

Forms. My
problem is: When I am done entering Equipment in the subform, I can't

tab out
of it to go on to an item on the main form like I could before in

Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am

new to
this. Thanks for any help.


In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.

Me![mainfom]![name of the field you want to go to].setfocus

THat should point you to the field you want when the last field on the
subform exist.

GL.




  #7  
Old December 17th, 2006, 01:51 PM posted to microsoft.public.access.forms
Ron Weaver
external usenet poster
 
Posts: 145
Default Need Code to tab out of subform

That works perfectly.
Thanks Tina

"tina" wrote:

well, here's another alternative that may work for you. in the subform, in
the last control's Exit event procedure, add the following code, as

If Me.NewRecord Then Me.Parent!ControlName.SetFocus

the above goes all on one line in the procedure, regardless of how the
newreader may wrap it here. replace ControlName with the correct name of the
control on the main form that you want the cursor to "land" in.

hth


"Ron Weaver" wrote in message
...
Thanks to you and Tina.
This gets me out of the subform ok, but before I'm through entering items.
After I'm through, I need to go to the next record in the subform and just
tab across to the last field. If it's blank or "0", then it takes me out

of
the subform. I hope this makes sense. I didn't explain it very well

before.
" wrote:


Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the

effects of
the change, I had to change my views from Database to Continuous

Forms. My
problem is: When I am done entering Equipment in the subform, I can't

tab out
of it to go on to an item on the main form like I could before in

Database
view. I'm sure there is some code I can put in that last field of the
subform, or somewhere, but I can't seem to make anything work. I am

new to
this. Thanks for any help.

In the last field on the subform, you may want to write a code on the
exist property of this field something like the below.

Me![mainfom]![name of the field you want to go to].setfocus

THat should point you to the field you want when the last field on the
subform exist.

GL.





  #8  
Old December 17th, 2006, 04:25 PM posted to microsoft.public.access.forms
tina
external usenet poster
 
Posts: 1,997
Default Need Code to tab out of subform

you're welcome


"Ron Weaver" wrote in message
...
That works perfectly.
Thanks Tina

"tina" wrote:

well, here's another alternative that may work for you. in the subform,

in
the last control's Exit event procedure, add the following code, as

If Me.NewRecord Then Me.Parent!ControlName.SetFocus

the above goes all on one line in the procedure, regardless of how the
newreader may wrap it here. replace ControlName with the correct name of

the
control on the main form that you want the cursor to "land" in.

hth


"Ron Weaver" wrote in message
...
Thanks to you and Tina.
This gets me out of the subform ok, but before I'm through entering

items.
After I'm through, I need to go to the next record in the subform and

just
tab across to the last field. If it's blank or "0", then it takes me

out
of
the subform. I hope this makes sense. I didn't explain it very well

before.
" wrote:


Ron Weaver wrote:
I have just made some cosmetic changes to my subform. To get the

effects of
the change, I had to change my views from Database to Continuous

Forms. My
problem is: When I am done entering Equipment in the subform, I

can't
tab out
of it to go on to an item on the main form like I could before in

Database
view. I'm sure there is some code I can put in that last field of

the
subform, or somewhere, but I can't seem to make anything work. I

am
new to
this. Thanks for any help.

In the last field on the subform, you may want to write a code on

the
exist property of this field something like the below.

Me![mainfom]![name of the field you want to go to].setfocus

THat should point you to the field you want when the last field on

the
subform exist.

GL.







 




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


All times are GMT +1. The time now is 04:25 PM.


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