Full Version: Setting Focus on Control on Sub-SubForm from SubForm
UtterAccess Forums > Microsoft® Access > Access Forms
This question stems from curiosity more than anything. If you are on the middle form of a Form-SubForm-SubSubForm setup and want to more focus to a control on the SubSubForm, what is the most efficient way to do this?
o far the only way I can achieve this is to set focus on the MainForm, then back to the SubForm, then on to the SubSubForm, then to the control.
It just seems like you should be able to set focus right to the SubForm, and then to the control.
See attachment...
I thought I had enough coffee today, but they brewed some crazy off brand instead of the good stuff here at work. dazed.gif
here is an example you can adapt to your situation
etFocus to a control on another subform
I use the OnKeyPress event of the control you want to jump to another -- set up to test for TAB key press
Private Sub Controlname_KeyPress(KeyAscii As Integer)
   If KeyAscii = 9 Then
   End If
End Sub

this is preferable to doing this automatically when you exit the control as you may want to specifically click somewhere else...
Sorry, Crystal.
till no go. Even with:
(see previously attached DB)
..I still cannot get focus to move directly to the Sub-Subform control from the SubForm. I've tried all variations of
..but still cannot get it to move DIRECTLY from the middle form to the third subform Form , to the CONTROL on the third subform.
I guess it one of those things.
Hi Walter,
will look at this later and see if I can figure something out
Don't spend too much time on it. I just thought there should be an easier way than what I had to do.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.