Results 1 to 10 of 10
  1. #1
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66

    Last Record Button Failure

    I've been using one of the standard Access buttons, the Last Record button, on a form in a training database. It allows the user to navigate through class sessions to see who attended, which is shown in a sub-form.



    The problem is that it's no longer navigating to the last record. There are currently 770 records in the table it references (tblClassSession), but the Last Record button navigates to record 745.

    Has anyone seen this behavior before?

    On a related note, clicking the Next Record button will not get to record 746, it acts as if there are no records after 745.
    Attached Thumbnails Attached Thumbnails ProblemForm.png  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    That may be a 'standard' button control but the code is custom. Show the code behind the button.

    Show the main form RecordSource sql.

    Are the main form Filter, FilterOn, SortBy properties set?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66
    Here's the button code for Last Record.

    Code:
    Private Sub LastRecord_button_Click()
    On Error GoTo Err_LastRecord_button_Click
    
        DoCmd.GoToRecord , , acLast
    Exit_LastRecord_button_Click:
        Exit Sub
    Err_LastRecord_button_Click:
        MsgBox Err.Description
        Resume Exit_LastRecord_button_Click
        
    End Sub

  4. #4
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66
    SQL from the top level of the form.

    Code:
    SELECT tblClassSession.*, tblClass.ClassName, tblLocation.LocationName
    FROM tblClass RIGHT JOIN (tblLocation RIGHT JOIN tblClassSession ON tblLocation.LocationID = tblClassSession.LocationID) ON tblClass.ClassID = tblClassSession.ClassID;

  5. #5
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66
    Design view of the form query.
    Attached Thumbnails Attached Thumbnails FormQuery.png  

  6. #6
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66
    Form properties.
    Attached Thumbnails Attached Thumbnails FormProperties.png  

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Why does the table show only 691 records?

    I can't see anything wrong to cause this issue.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66
    It really only has 691 rows; silly me was looking at the number in the ClassEventID column, which goes up to 770 at present. Some rows containing test data were deleted a long time ago.

  9. #9
    Ted C is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    66
    I'll have to see how much work it will take to make the DB shareable.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Activate the intrinsic Access navigation bar on the main form. What is the record when clicking the last record button?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Find Record Failure
    By The Professor in forum Forms
    Replies: 9
    Last Post: 08-05-2014, 04:25 PM
  2. Replies: 4
    Last Post: 07-22-2011, 12:52 PM
  3. Replies: 10
    Last Post: 03-21-2011, 02:46 PM
  4. Replies: 6
    Last Post: 02-09-2010, 07:53 AM
  5. Duplicate record failure
    By bugchaser in forum Access
    Replies: 5
    Last Post: 05-21-2009, 08:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums