#deleted

  • Thread starter Thread starter DennisB
  • Start date Start date
D

DennisB

I have an read-only, Access 2003 database in a multi-user environment.

I use a pass through query to pull data from an Oracle database each minute
and use the results of this query to add the data to an Access Table.

I have a form based on the AccessTable. The form opens for 1 minute, then
closes while new data is added to the Access table and then re-opens.

Periodically all the fields in the form go green and display #deleted.

Can anyone help me to stop this happening.

Thanks

Dennis
 
Dennis:

Rather than closing and reopening the form why not just requery it with, if
from within the form's module:

Me.Requery

or:

Forms("YourFormName").Requery

if from outside the form's module.

This will move the record pointer back to the first row I the form's
underlying recordset. If you want to stay at the current row then you'd have
to grab its primary key value to a variable and then use this to navigate
back to the current record after requerying e.g.

Dim rst As Object
Dim lngID As Long

lngID = Me.MyID

' <code to update local table with Oracle data>

Me.Requery

Set rst = Me.Recordset.Clone

With rst
.FindFirst "MyID = " & lngID
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With

Set rst = Nothing

If when requeried the form was at a row which has been deleted when next
pulled from the Oracle table(s) the form will go back to the first row,
otherwise to the current row.

Ken Sheridan
Stafford, England
 
Back
Top