D
Dirk Goldgar
Cindy K said:I am up to date with all updates from Microsoft. That was actually my
first move. I wish I could send out a copy, but my hands are tied
with that. I have noticed that as the number of records grow, the
problem occurs more often. I'm not sure if it is the same bug but the
symptoms seem to fit. I appreciate all your help and information.
I can't think of anything else I can do at this point, then. I'm
skeptical of an Access or Jet bug, but I can't rule it out and it's
clear that's what you think is going on. I don't think I asked whether
this is an .mdb or an .adp, or whether the tables are native Jet tables
or linked from an ODBC data source. If the latter, it could be a flaw
in the ODBC driver, or possibly something in the communication between
the two.
Wait a minute! I just noticed something in your code. These lines in
your combo box's AfterUpdate event procedure:
rs.FindFirst "[CustNo] = " & Str(Nz(Me![CustCombo], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
If this is a Jet database, so that your form's recordset and
recordsetclone are DAO recordsets, then you should *not* be testing the
recordset's .EOF property to see if you have found the record. You
should be checking the .NoMatch property! I know this is
wizard-generated code, but it unless your combo box's LimitToList
property is set -- or if a record listed in the combo box has been
deleted since the control's rowsource was last requeried -- that code
will fail, and (I think) leave you in an unpredictable location.
Change the code to:
rs.FindFirst "[CustNo] = " & Str(Nz(Me![CustCombo], 0))
If Not rs.NoMatch Then Me.Bookmark = rs.Bookmark
and see if the problem goes away. You may even want to put a message in
the code like this:
rs.FindFirst "[CustNo] = " & Str(Nz(Me![CustCombo], 0))
If rs.NoMatch Then
MsgBox _
"The record you searched for does not exist. " & _
"It may have been deleted by another user."
Me!CustCombo.Requery
Else
Me.Bookmark = rs.Bookmark
End If