chriske911 said:
What constitutes the "last" subrecord? If you want to allow new records to
be entered at all, then tabbing through the fields in each record will
eventually put you into the first field of the next record, and then (after
all existing records) into the first field of the new (empty) record. How can
Access tell whether you want to enter a new record or not?
That said... you can put an unbound textbox last in the tab order. In its
GotFocus event you can put code like
Me.Parent.SetFocus
Me.Parent.controlname.SetFocus
to jump to a selected control in the parent form. It sounds like you only
want to do so selectively, so you'll need to decide under what conditions you
want to jump out, and under what other conditions you don't!
it actually doesn't matter to me if I can jump out on the first or last
bound control of an existing subrecord or from the "new" subrecord
it's only that I want the user to stay in tabbing inside the current
displayed page
for now I do jump from the parent's last control into the first control
of the top record in the subform (continuous view)
but I don't know of a way to get out of it and return to the parent
form
setting focus is not necessary cause of the tab order
when I enter the parent form the focus will automagically be set to the
control with the lowest tab index, right?
I was thinking of using the current event and stating something like on
entering a new record jump to the parent form
but off course this would prohibit the adding of any new record
so it has to be something that will jump if it is entered by tabbing
but not when reached by mouse click
or maybe....
would it be handy if I were to provide a keyboard shortcut for this?
something like on keypress alt + R (from Return, you see ;-)
and jump in and out respectively
thnx