Colby, John
JColby at dispec.com
Tue Jul 20 11:08:50 CDT 2004
Rocky, The question is "what is the desired control to set the focus in", NOT how to set the focus. In any form, there is no single "tab index 0" control. If you have a header with controls in it, there will be one there. If you have a footer with controls, there will be one there. There will be one in the main part of the form. Furthermore, if you have tab controls, EACH page of the tab control has it's own tab order etc. So.. if I am in the header and tap the tab key I go one place, if I am in the footer and tap the tab key I go another, if I am in the main part of the form I go a third, if I am in page1 of the tab control I go another, if I am in page 2 of the form I go another..... WHICH CONTROL WILL RECEIVE THE FOCUS IF I TAP THE TAB KEY? To complicate matters further, just because a control has tab index set to 0 doesn't mean it can get the focus. It may be invisible, it may be disabled, or it may simply have it's property that allows it to be "tabbed into" set to false. My question is... How do I determine WHICH control would get the focus if the tab key were tapped? The answer varies depending on whether there are tabs (if so which tab is currently selected?), whether the current focus is in the header / footer / body of the form, etc. UGLY question, and Access is no help at all determining the answer (AFAICT). This is one of those "the stupid bastards know the answer" (the tab key works doesn't it?) but they don't expose the answer to me so I can set the focus to that control using SomeControl.SetFocus syntax. JWC. -----Original Message----- From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] Sent: Tuesday, July 20, 2004 11:34 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] moving focus off the tab page John: Why can't you use the _Open event of the form to se the focus to the desired control? Rocky