forms and focus

maxmangion

AWF VIP
Local time
Today, 20:00
Joined
Feb 26, 2003
Messages
2,805
I have a form which includes a subform. When the subform has the focus, i would like that when the focus is on the first field, if i press Shift+Tab, i would like to return the focus to the last field of the form ... is this possible ?

Thanks
 
maxmangion said:
I have a form which includes a subform. When the subform has the focus, i would like that when the focus is on the first field, if i press Shift+Tab, i would like to return the focus to the last field of the form ... is this possible ?

Thanks

If it does not do it by default, then there is a way to force it to do this.

This website should help you along
http://www.officecomputertraining.com/vbtutorial/tutpages/page9.asp

Does this help? Please respond
 
thank you for the link, it looks interesting, i'll give it a look. Actually, i was aware that it can be done with code, but i thought there was an easier method to achieve it.

Thanks
 
maxmangion said:
thank you for the link, it looks interesting, i'll give it a look. Actually, i was aware that it can be done with code, but i thought there was an easier method to achieve it.

Thanks
Now that I think of it, when in design view, try right clicking and choose "Tab Order...". You can then choose which order the curser goes.

don't forget the list in the popup box is different depending if you have the subform focused or the mainform etc etc.
 
i gave a look at the tab order, as you suggested, but unfortunately it doesn't seem to be doing the trick. Anyway, I will try it out with some coding.

Thanks
 
maxmangion said:
i gave a look at the tab order, as you suggested, but unfortunately it doesn't seem to be doing the trick. Anyway, I will try it out with some coding.

Thanks
Since you do not know how to use the Tab order... function I may have to tell you.

In the main form open up Tab order, make sure the last field is at the ***Edit*** second last from the bottom with the name of the subform at the bottom ***Edit*** ( if it is not click on the row button on the side for the right field then click and drag it down the list), then if in the subform the First field is not at the top of list then click on the row button on the side for the right field then click and drag it up the list.

Does this help? Please respond
 
Last edited:
in the Tab Order, i have the name of the subform, which is being displayed the last item (as it should). Therefore, i cannot see how i can do your suggestion.
 
For each of the controls in the subform that you do not want to get focus, in their properties, set "Tab Stop" to "no"

Does this help? Please respond
 
it is not my intention that i will set no focus to some of the fields, all i want is if i am in the first field of the subform, and i hit shift+tab i will return to the previous field i was in (i.e. last field of the main form).
 
Well keep playing with it. I got mine to work, so I don't know why yours is not working.
 

Users who are viewing this thread

Back
Top Bottom