Hi,
I am looking to add to this code.. (as below)
I have a combo box in which i select a name it finds the associated record with the name entered. However, if i want to find another record with the same name - i have to press ctrl & f and click on find next..
Can I add a "find next" piece of code to it?
I want to select name and if it is not that record when i hit enter again it finds the next record with the same name and so on ...
e.g. I could have 3 records with name Smith on it? When i select the first smith, only the first record appears.
DoCmd.FindNext doesnt work at end of code?
Anyone any ideas?
Here is current code:
Private Sub Combo367_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CallRef] = " & Str(Nz(Me![Combo367], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.Combo367 = Null
End Sub
I am looking to add to this code.. (as below)
I have a combo box in which i select a name it finds the associated record with the name entered. However, if i want to find another record with the same name - i have to press ctrl & f and click on find next..
Can I add a "find next" piece of code to it?
I want to select name and if it is not that record when i hit enter again it finds the next record with the same name and so on ...
e.g. I could have 3 records with name Smith on it? When i select the first smith, only the first record appears.
DoCmd.FindNext doesnt work at end of code?
Anyone any ideas?
Here is current code:
Private Sub Combo367_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[CallRef] = " & Str(Nz(Me![Combo367], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.Combo367 = Null
End Sub