I've moved the database tables from the .mdb file to Sql Svr and now I have
an *intermittent* problem. When I select a record from a combo box, it will
intermittently pull up the wrong record. The code that does the search is
below. I have a column named 'ProsId' that is a unique number (identity
column). The error -- when it happens -- seems to only happen on higher
ProsId numbers. At first it appeared to me as some sort of data conversion
thing, but I'm not so sure now. Here's some examples:
Record selected Record actually displayed
---------------- -------------------------
100,000 41,859
59,073 15,794
57,000 11,273
57,001 11,274
45,000 45,000 <--- appears to return correct
value every time. Numbers lower than this also seem to return the correct
record every time.
Private Sub cboFindProsName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
If Len(Trim(Me.cboFindProsName.Text)) > 0 Then
Set rs = Me.Recordset.Clone
rs.FindFirst "[ProsId] = " & (Me![cboFindProsName])
Me.Bookmark = rs.Bookmark
End If
End Sub
Many Thanks!