Silverbear
Programmer
I'm trying to make a selection in an Access 2002 combo box using VBA. I don't know how to set the pointer to a particular row without forcing the user to click on the control.
I have created the row source for the combo box with a sql query. That works well. If the row source query brings back two or more rows I set the focus to the control and allow the user to select.
If only one row is returned, I want to select that row with VBA so that I can bypass the field. How do I do this?
I've checked the ListIndex after the requery and it is -1. The returned row is in row 0 (zero). How do I select row 0 using code?
I have created the row source for the combo box with a sql query. That works well. If the row source query brings back two or more rows I set the focus to the control and allow the user to select.
If only one row is returned, I want to select that row with VBA so that I can bypass the field. How do I do this?
I've checked the ListIndex after the requery and it is -1. The returned row is in row 0 (zero). How do I select row 0 using code?