J
jcwalnut
I have a combo box on a continuous form. I have changed the arrow key
behavior with the following code:
Select Case intKeyCode
Case vbKeyUp
If Me.CurrentRecord > 1 Then
DoCmd.GoToRecord , , acPrevious
End If
Case vbKeyDown
If Me.CurrentRecord < Me.RecordsetClone.RecordCount
Then
DoCmd.GoToRecord , , acNext
End If
End Select
However, now the combobox's dropdown arrow doesn't work. Specifically,
the box won't expand. Instead, focus is moved to the next record.
I have inserted the following above the Select Case statement:
If Screen.ActiveControl = Me!cboInvLocation Then GoTo End_KeyDown
If intShift And 4 Then GoTo End_KeyDown
Unfortunately, these two snippets don't quite fit the bill since the
first, although it allows the dropdown arrow to work and a selection to
be made, the arrow key code is bypassed after that. The second allows
the dropdown arrow to expand the list; however, because of the arrow
key code above, a selection can't be made from the list (that is, focus
is moved to the next record.
It seems to me that I need to incorporate the snippets within the case
statements and also include code that determines when the combobox list
is expanded. However, my problem is I don't know how to determine the
status of the list. I've googled through the groups and haven't found
any reference to this problem nor how to determine if the list is
expanded or not. So, I was hoping someone could help me out.
behavior with the following code:
Select Case intKeyCode
Case vbKeyUp
If Me.CurrentRecord > 1 Then
DoCmd.GoToRecord , , acPrevious
End If
Case vbKeyDown
If Me.CurrentRecord < Me.RecordsetClone.RecordCount
Then
DoCmd.GoToRecord , , acNext
End If
End Select
However, now the combobox's dropdown arrow doesn't work. Specifically,
the box won't expand. Instead, focus is moved to the next record.
I have inserted the following above the Select Case statement:
If Screen.ActiveControl = Me!cboInvLocation Then GoTo End_KeyDown
If intShift And 4 Then GoTo End_KeyDown
Unfortunately, these two snippets don't quite fit the bill since the
first, although it allows the dropdown arrow to work and a selection to
be made, the arrow key code is bypassed after that. The second allows
the dropdown arrow to expand the list; however, because of the arrow
key code above, a selection can't be made from the list (that is, focus
is moved to the next record.
It seems to me that I need to incorporate the snippets within the case
statements and also include code that determines when the combobox list
is expanded. However, my problem is I don't know how to determine the
status of the list. I've googled through the groups and haven't found
any reference to this problem nor how to determine if the list is
expanded or not. So, I was hoping someone could help me out.