Next/Prev keys for a combo box

M

Max Yaffe

Hello Group:

I'm trying to use a couple of command buttons to navigate a combo box
up & down.

The combo box is unbound and has a row source defined by a query (
like "Select Part from tblParts"). This is contained in a form that
has a computed record source based on value in the combo box. Because
of this, I can't use the form's record selectors -- they change.

So how can I command buttons to bump the contents of the combo box to
next or previous row?

Thanks
Max
 
B

Brendan Reynolds

This code moves forward through the items in the list box. Just reverse the
logic to move back ...

If Me.Combo0.ListIndex < Me.Combo0.ListCount - 1 Then
Me.Combo0 = Me.Combo0.ItemData(Me.Combo0.ListIndex + 1)
End If
 
Top