Bookmark not working

  • Thread starter Thread starter Gibson
  • Start date Start date
G

Gibson

I use the following code behind a control on a form to delete a record and
then call up the previous record. There can be multiple Inv's per FileNo. It
seems to find the match, rst.NoMatch is returned as false, but the previous
record is not displayed. The first record in the table is displayed as if I
just opened the form. Any thoughts? strFile is set to the current file and
strInv is set to the previous Inv.

Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
vFind = "FileRef = '" & strFile & "' AND InvDel = '" _
& strInv & "'"

rst.FindFirst vFind
Me.Bookmark = rst.Bookmark
Set rst = Nothing
 
After the FindFirst, test NoMatch.

It might also be the event where you are running this code. Has the deletion
completed, or is Access still doing stuff?
 
Back
Top