E
egibson
I'm using a combo box on my form to populate the entire form with the
information the user selects in the combo box. I am having trouble with my
code and it is not finding the record. I'm not sure why this is happening.
My ID is an autonumber and I'm not sure if this is why or not. Any help
would be greatly appreciated. Here is my code:
Private Sub Combo216_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID]= " & Me![Combo216].Column(0) & ""
If Not rs.EOF Then
MsgBox "Record not found " & Me![Combo216].Column(0) & ""
Else
Me.Bookmark = rs.Bookmark
End If
Me!Combo216 = ""
Refresh
Me!Provider.SetFocus
End Sub
information the user selects in the combo box. I am having trouble with my
code and it is not finding the record. I'm not sure why this is happening.
My ID is an autonumber and I'm not sure if this is why or not. Any help
would be greatly appreciated. Here is my code:
Private Sub Combo216_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID]= " & Me![Combo216].Column(0) & ""
If Not rs.EOF Then
MsgBox "Record not found " & Me![Combo216].Column(0) & ""
Else
Me.Bookmark = rs.Bookmark
End If
Me!Combo216 = ""
Refresh
Me!Provider.SetFocus
End Sub