Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form not displaying Bookmarked record

Status
Not open for further replies.

EddyLLC

Technical User
Mar 15, 2005
304
US
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, Me.RecordsetClone.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?

RunCommand acCmdDeleteRecord
vFind = "FileNo = '" & strFile & "' AND Inv = '" _
& strInv & "'"
Me.RecordsetClone.FindFirst vFind
Me.Bookmark = Me.RecordsetClone.Bookmark

 
And this ?
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst vFind
Me.Bookmark = rst.Bookmark
Set rst = Nothing

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yes with the same result. The first record in the table is displayed instead of a previous invoice of the same file nmber. Very frustrating.
 
HI

Try

vFind = "FileNo = '" & strFile & "' AND Inv = '" _
& strInv & "'"
Me.RecordsetClone.FindFirst vFind
If Me.RecordsetClone.NoMatch Then
msgBox "Not Found"
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If

What happens?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top