[AccessD] Error #: 3709 "The search key was not found in any record"

Charlotte Foust charlotte.foust at gmail.com
Tue Jul 14 13:14:48 CDT 2015


I don't see MoveFirst in there anywhere, just a MoveLast.  EOF and BOF can
potentially be true when you don't start on the first record, and Record
Count in a DAO recordset  can return -1 if you don't movelast then
movefirst before calling it.

Charlotte Foust
(916) 206-4336

On Mon, Jul 13, 2015 at 5:22 PM, Robert <robert at servicexp.com> wrote:

> Ok so I'm at my wits-end here; for some reason I have a customer that is
> intermittently getting the above error.
>
> 1) There is no corrupted records, I can add and or delete records, I can
> delete all records, etc.
> 2) There are no primary keys on memo fields.
> 3) I can compact and repair both back end db's with no problem
> 4) I have run both db's through JetCOMP.
>
> I simply cannot find any problems with the data or structure of these
> databases.
>
> MS Access 2007 .mde front end
> Ms Access 2002 .mdb back end (both) One is secured and the other is not.
>
> Here is the code (I know it's not very efficient but...:-) ) that is
> generating the error maybe 2 to 3 times a day. (this function is called
> every 5-10 minutes during a 10 hour day)
>
>
>
>
> ***********************************************************************************************
>
>
> '---------------------------------------------------------------------------------------
> '. Procedure : SyncroniseEventTbl
> '. DateTime  : 11/15/2006 19:57
> '. Author    : Robert
> '. Revision  :
> '  Purpose   : Synchronize The ServiceCall Table and The Event Table (2
> different db's)
>
> '---------------------------------------------------------------------------------------
> '
> Public Function SyncroniseEventTbl() As Boolean
>       Dim db                  As DAO.Database
>       Dim rstSCTbl            As DAO.Recordset
>       Dim rstEvents           As DAO.Recordset
>       Dim lRN                 As Long
>       Dim dOldDate            As Date
>       Dim dNewDate            As Date
>
>       Dim dSchTimeStart       As Date
>       Dim dSchTimeEnd         As Date
>
>       'Let do a quick orphan kill run before we start
> 10       On Error GoTo HandleErr
> 20     DeleteScheduleEventOrphan
>
> 30    Set db = CurrentDb
> 40    Set rstSCTbl = db.OpenRecordset("qryselShedulerViewCal",
> dbOpenForwardOnly)
> 50    Set rstZones = db.OpenRecordset("qrySelZones", dbOpenDynaset)
> 60    Set rstEvents = db.OpenRecordset("Event", dbOpenDynaset)
>       ''Debug.Print "Syncing Tbls"
> 70    PMIncrement 1, "Opening and Retrieving Schedule data ..."
> 80    With rstSCTbl
> 90     If .RecordCount > 0 Then
> 100       DoEvents
> 110      Do Until .EOF
> 120      PMIncrement 1, "Opening and Retrieving Schedule data ..."
> 130       CalendarLocked = False
> 140        rstEvents.FindFirst "RepairNumber= " & CLng(!RepairNumber)
>
> 150         If rstEvents.NoMatch = True Then 'Lets add the event to the
> table
> 160           If IsNull(!DateScheduled) = True Then 'We don't want to add
> any none scheduled items
>     GoTo MoveHere:
> 170           End If
>
>
>
>
> **************************************************************************************************
>
>
>


More information about the AccessD mailing list