tab key and form sections

  • Thread starter Thread starter Roland Alden
  • Start date Start date
R

Roland Alden

I have a form where on the Header I have an important field (name) but most
of the rest of the data is in the Detail section. When I chose "new record"
I have two problems:

The cursor is not active on the first tab enabled control on the Header it
is on the one in the Detail section. As I would like to start with the name
this is not too nice.

Second problem. The tab key doesn't take the insertion point from the header
across to the detail section. Thus, after typing the name hitting "tab"
won't take the insertion point to the first interesting field in the Detail
section.

I guess I'm trying to "fight the system" since the defaults are reasonable
but it seems to me to be reasonable to put some interesting data on the
header since it will stay visible on a scrolled form. At the same time,
since this is the most interesting data, it is likely it will be of interest
first/early when creating a new record.
 
Roland,
To reset the tab location when you change records use the OnCurrent
Event for the form and then setfocus to where you want it to go to. Not sure
what to tell you about moving it over to the main form body though.

Troy W.
 
To move from the Header to the Detail section, you can use the
KeyPreview property in conjunction with the KeyDown event to trap the
Tab key for the control in the Header and set the focus to the first
control in the Detail section.

Regards,
Andreas
 
Thank you both. I realize now that I had some other Key event handling code
that was complicating matters but now I can figure it all out.
 
Back
Top