Access 2k Changes record not viewed. - TechRepublic
General discussion
May 9, 2001 at 12:49 PM
brent.brewer

Access 2k Changes record not viewed.

by brent.brewer . Updated 25 years, 1 month ago

I have a database that was developed in Access 2.0, converted to Access 97 with no problems. Now when I converted it to Access 2K a very peculiar thing happens.

After pressing one of the ?sort? buttons I have created at the top of the form, any record changes that are made actually change the record that is exactly 405 records above it. The change is to the record that is 405 above it in the current sort order. So attempting to change the record sorted by Firstname will actually change a different record than changing the same recorded when sorted by Lastname. Note: sorting by using the toolbar sort ascend/descend

Note:
—This does NOT happen when sorting in the table itself, just when in the form.
—The Form is based on the table with no filters applied.
—The table has 58459 records.

This is the code that I use for the ‘sort’ button on the form.
——–
Private Sub Firstnamesort_Click()

If IsNull(Me![Firstname]) Then
previousloc = “”
Else
previousloc = Me![Firstname]
End If

On Error GoTo Firstnamesort_sort_err

‘Me.OrderBy = “Firstname”
Me.OrderBy = “Firstname, Lastname, City”
If previousloc = “” Then Exit Sub
On Error GoTo Firstnamesort_find_err

Me![Firstname].SetFocus
DoCmd.FindRecord previousloc, acStart, False

Firstnamesort_exit:
Exit Sub

Firstnamesort_sort_err:
MsgBox “Could not sort”
Resume Firstnamesort_exit

Firstnamesort_find_err:
MsgBox “Could not find previous record”
Resume Firstnamesort_exit

End Sub

This discussion is locked

All Comments