J
John S. Ford, MD
I am working with Access 97 and have a form with a ComboBox (cboFirst), a
TabControl and a ComboBox (cboSecond) on the first tab. I also have a
"Sentinel CommandButton (cmdSentinel) between cboFirst and the TabControl.
The tab order of these controls is cboFirst, cmdSentinal, TabControl,
cboSecond and my goal is two-fold:
1) Have my user to be able to tab (or hit <return>) thereby navigating from
cboFirst to cboSecond with just the keyboard. This would save the user from
mouse-clicking while entering data.
2) Have cboSecond "dropdown" as soon as it receives the focus.
You can't tab or <return> "directly" from a control on the form to a control
residing on a tab so I'm using cmdSentinel as a intermediate control (a
Sentinel control) as documented in the book "Access 97 Expert Solutions"
with the following code:
Private Sub cmdSentinel_Enter()
cboSecond.SetFocus
End Sub
Private Sub cboSecond_GotFocus()
Me!cboSecond.Dropdown
End Sub
Goal 1) works perfectly. But unfortunately, cboSecond drops down for only
an instant and then closes on its own. Any idea why this happens?
John
TabControl and a ComboBox (cboSecond) on the first tab. I also have a
"Sentinel CommandButton (cmdSentinel) between cboFirst and the TabControl.
The tab order of these controls is cboFirst, cmdSentinal, TabControl,
cboSecond and my goal is two-fold:
1) Have my user to be able to tab (or hit <return>) thereby navigating from
cboFirst to cboSecond with just the keyboard. This would save the user from
mouse-clicking while entering data.
2) Have cboSecond "dropdown" as soon as it receives the focus.
You can't tab or <return> "directly" from a control on the form to a control
residing on a tab so I'm using cmdSentinel as a intermediate control (a
Sentinel control) as documented in the book "Access 97 Expert Solutions"
with the following code:
Private Sub cmdSentinel_Enter()
cboSecond.SetFocus
End Sub
Private Sub cboSecond_GotFocus()
Me!cboSecond.Dropdown
End Sub
Goal 1) works perfectly. But unfortunately, cboSecond drops down for only
an instant and then closes on its own. Any idea why this happens?
John