I have combobox whose rowsource type is set to Table/Query. Its rowsource is set to a query that displays five columns. The columns are sorted by first then second then third. The BOUND column property to the combobox is set to column five.
In VBA code, I am able to choose a value from the combobox and set the record of the form to match the value based on that fifth column value in the combobox list.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[strApp] = '" & Me.cboApp & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Set rs = Nothing
This works. The catch? Well, after the combobox closes, it displays the value of the
first column for that row, not the fifth.
I've checked the query, the bound column setting (5), the column width properties (0.5";1.5";0.25";4";1.5") and the column count property (5). Still, even though the bound column is no. 5 and the combobox's AfterUpdate event is working correctly, it still shows the FIRST column's value instead of the fifth in the combobox. I must be missing something obvious from staring at this too much.
Any clues?
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division