June has explained how to get the sorting you want, with the Field being defined as Text.
But FYI, the reason for the problem, when changing the Field to a Number Datatype, is how different Datatypes are delimited. Below is typical code for retrieving a Record using a Combobox.
If the identifying Field is defined as Text, as yours was:
Code:
Private Sub ComboName_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = '" & Me![ComboName] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
If defined as a Number:
Code:
Private Sub ComboName_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Me![ ComboName]
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
The same general syntax is used elsewhere for 'where' clauses and 'criteria' clauses.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007