Hi All
Here is my code that works apart from the fact when a new record is added it gets added at the bottom of the combo box.
How can I sort the combobox please?
Private Sub cboSearch_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Family_ID] = " & Str(Nz(Me![cboSearch], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub cboSearch_GotFocus()
Me.cboSearch.Dropdown
End Sub
Private Sub Form_AfterUpdate()
Me.cboSearch.Requery
End Sub
Private Sub Form_Current()
Me.cboSearch = ""
Me.Family_Name.SetFocus
End Sub
Thanks
Gene
Here is my code that works apart from the fact when a new record is added it gets added at the bottom of the combo box.
How can I sort the combobox please?
Private Sub cboSearch_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Family_ID] = " & Str(Nz(Me![cboSearch], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub cboSearch_GotFocus()
Me.cboSearch.Dropdown
End Sub
Private Sub Form_AfterUpdate()
Me.cboSearch.Requery
End Sub
Private Sub Form_Current()
Me.cboSearch = ""
Me.Family_Name.SetFocus
End Sub
Thanks
Gene