OK, now I understand. I think the reason is that, when you select an item in
the combo box, your posted code moves the form to the desired value, which
may be "resetting" the combo box's ListItem property back to the first item
in the list, even though the combo box is still showing the selected item.
My spin-button code reads the ListItem property and moves the combo box to
the next or previous item.
You can test my hypothesis by putting a breakpoint on the first code line
for the spin button; when you click the spin button, the code will "break",
and you can hover the cursor over the .ListItem property in the code to see
what it's value is. You also can test by reading the .ListItem value in your
AfterUpdate event prior to resetting the form's data to the Clone's
bookmark, and after resetting the data, to see if it changes.
If I'm correct, you'd need to set the combo box to the initial ListItem
value. Here is revised code that would do what I am thinking (note that I've
changed your use of Recordset.Clone to RecordsetClone; less overhead for the
database because the RecordsetClone object already exists, while the
database must create the Recordset.Clone object first):
Private Sub Combo20_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object, lngList As Long
lngList = Me![Combo20].ListIndex
Set rs = Me.RecordsetClone
rs.FindFirst "[LastNameFirstName] = '" & Me![Combo20] & "'"
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
Me![Combo20].Value = Me![Combo20].ItemData(lngList)
End If
Set rs = Nothing
End Sub
If you have trouble with this, send me a zipped copy of the database, with
instructions on how to reproduce and in which form, to the email address at
my website (see my signature).
--
Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/