How to make a Navigation ComboBox Keep Up With Records

jereece

Registered User.
Local time
Today, 19:47
Joined
Dec 11, 2001
Messages
300
I added a combo box to a form to go to the record selected in the combo box. Access added the following code to the AfterUpdate event of the combo box.

Code:
Private Sub Combo37_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[ECIIP#] = '" & Me![Combo37] & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

After going to a record using the combo box, then navigating one record at at time using the standard navigation buttons, is there a way for the combo box to keep up with the records? In other words I want the record navigation combo box to match the actual record number. The problem is, Access has already added an AfterUpdate event.

Thanks,
Jim
 
In the forms OnCurrent event put

me.combo37 = Me![ECIIP#]

but you should never have # in a field name.

Dave
 
It worked great. And I took the # out of the field name. I should have known that.

I appreciate the help.

Jim
 

Users who are viewing this thread

Back
Top Bottom