Cursor Control from Main Form to SubForm

  • Thread starter Thread starter AngelT
  • Start date Start date
A

AngelT

Guest
As per the title, I am working with issues pertaining to tab control between the main and subform.

When the form is initially opened, the tab (focus) commences on the first field of the subform.

1. I would rather it start on the first field of the main (in form header)

2. After entering data in this field on Main form, when I press the tab key it does not go anywhere. At this point I would like it to go into the subforms (first field).

Do I need to create macros for these events to function as desired?

I have double checked all of the tab settings per each item and all appears to be correct. What am I missing now? :rolleyes:
 
To set the focus on the field in the main form, you place this code in the form's onCurrent event:

me.yourfieldname.setfocus

To tab to the fields on the subform, you need to place the subform name in your Tab Order - it should work without special coding. If you want to jump back to the main form from your subform, however, then check out this MS Knowledge Base article for info on how to do that:

http://support.microsoft.com/default.aspx?scid=kb;en-us;210011

HTH
Elana
 
Thank you Elana!!!

Setting focus via onCurrent event was the answer to part 1 of my delima. :)

I had to work a little bit on resolving part 2, but I just got it. I ended up placing the following command on the AfterUpdate for the last control on my main form: me.name of subform .setfocus

Awesome!!

You are greatly appreciated!!:D
 
Okay......sorry, but I'm back on this topic again. :confused:

I have a main form; subform1 and subform2 (within subform1).

If I open subform1, outside of the main form (testing purposes) the focus is working as I would like (on the first field of subform1); however when subform1 loads from within the main form the focus does not appear.

What the heck am I missing?
 

Users who are viewing this thread

Back
Top Bottom