By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

Strange "Mystery Record" Behavior

P: n/a
Hello Everyone:

I'm having a very strange problem occurring with my Access 2000 database. I
call it the "mystery record."

Here's the story:

I have a query by form that returns a record set in a datasheet. The user
double clicks on a row in that datasheet and a main form (pop up) opens
bound to a table with a continuous subform bound to a query.

The user can move through this recordset via a Next and Previous command
button on the main form. Everything works fine except for the "mystery
record". When you click on the Next or Previous button, it will move to the
correct record in the recordset, however the first record of the main form
table is temporarily displayed. And by temporarily I mean it flashes for a
second or so before it moves to the correct Next or Previous record.

I've tried adding DoCmd.Echo False to my Next and Previous command button
but that didn't work. Here's the code in the Next Button:

Private Sub cmdNext_Click()
Dim rst As DAO.Recordset

On Error Resume Next

Set rst = Forms("frmSearch").sfrmSearchResults.Form.Recordse t

rst.MoveNext

If rst.EOF Then
MsgBox "End of records. Close this form to search again.",
vbOKOnly, "Search"
rst.MoveLast
Exit Sub
End If

Me.FilterOn = False
Me.Filter = "StudentID=" & rst.Fields(0)
Me.FilterOn = True

Set rst = Nothing

End Sub

Any ideas on this wierd behavior? Should I put additional code in the
OnCurrent Event of the Main Form?

Thanks,

William

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.