Bookmark not working

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
 
A

Allen Browne

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top