Hello,
Does anyone know where I would find a good resource on tab order? I
understand how to set tab order on one form but it gets tricky when I'm
trying to tab correctly from one subform to another subform.
The usual problem in this situation is that once you tab into a subform, just
hitting tab will keep you in the subform - on the same record if the Cycle
property is set to same record, or to a new record on the subform if it's set
to All Records.
You can tab out of the subform to the next control in the parent form's tab
order by typing Ctrl-Tab. If the next control is another subform... well,
there you are.
You can also put an unbound control last in the first subform's tab order. Put
it behind some other control and/or make it one twip square so that it's not
going to be hit with the mouse; in its GotFocus event you can put code like
Private Sub txtRelay_GotFocus()
Parent.SetFocus
Parent.Subform2.SetFocus
Parent.Subform2.Form!controlname.SetFocus
End Sub
to explicitly move to a chosen control in subform2.
John W. Vinson [MVP]