Results 1 to 6 of 6
  1. #1
    joehohn is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    4

    NextRecord button and position on the NextRecord form

    I have an access form that I use as a front end to SharePoint 2007. It was originally created and used in Office 2007. We have upgraded to Office 2010 and the behavior has changed as follows.

    Access 2007 behavior:

    • Viewing a record with the form scrolled to the bottom
    • Click the "NextRecord" button on the form.
    • The record would change and the form would remain at the bottom. (Desired behavior)


    Access 2010

    • Viewing a record with the form scrolled to the bottom
    • Click the "NextRecord" button on the form.
    • The record would change and the form jumps to the TOP of the next record. (Undesired behavior)




    This change came with Office 2010.

    Is there a way around this?

    Thanks

    --JoeH

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Post your code that supports the command button "Next Record."

  3. #3
    joehohn is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    4
    Quote Originally Posted by alansidman View Post
    Post your code that supports the command button "Next Record."
    I am using a Macro to go to the next record.

    Click image for larger version. 

Name:	NextRecordCode.jpg 
Views:	7 
Size:	15.6 KB 
ID:	10758

    I just did a quick conversion to vb and I get the same behavior that the next record jumps to the top of the form and does not remain at the bottom. My co-workers scan for errors this way.

    Private Sub Command788_Click()
    On Error GoTo Command788_Click_Err

    ' _AXL:<?xml version="1.0" encoding="UTF-16" standalone="no"?>
    ' <UserInterfaceMacro For="Command787" xmlns="http://schemas.microsoft.com/office/accessservices/2009/11/application" xmlns:a="http://schemas.microsoft.com/office/accessservices/2009/11/forms">
    ' _AXL:<Statements><Action Name="OnError"/><Action Name="GoToRecord"><Argument Name="Record">Previous</Argument></Action><ConditionalBlock><If><Condition>[MacroError]&lt;&gt;0</Condition><Statements><Action Name="MessageBox"><Argument Name="Message">=[Mac
    ' _AXL:roError].[Description]</Argument></Action></Statements></If></ConditionalBlock></Statements></UserInterfaceMacro>
    On Error Resume Next
    DoCmd.GoToRecord , "", acNext
    If (MacroError <> 0) Then
    Beep
    MsgBox MacroError.Description, vbOKOnly, ""
    End If


    Command788_Click_Exit:
    Exit Sub

    Command788_Click_Err:
    MsgBox Error$
    Resume Command788_Click_Exit

    End Sub
    THanks,

    --JoeH

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    In your code, insert a line of code to SetFocus to the control you wish to have Access set to after the DoCmd line.

    DoCmd.GoToRecord , , acNext
    Me.NameofYourField.SetFocus

  5. #5
    joehohn is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    4
    ATTENTION MODERATORS

    I think I originally posted this to the Access, Forms forum list not the SharePoint forum.

    This is actually an ACCESS question, not a SharePoint question. I had mentioned that I am using this ACCESS FORM to modify data in a SharePoint list. The SharePoint list acts the same as a TABLE in MS Access. If I convert the list to a LOCAL TABLE in Access 2010 I get the same behavior with the Next Record action. So I am certain that it is not a SharePoint issue.

    PLEASE move back to the ACCESS, FORMS thread list.

    Thank You,

    --JoeH

  6. #6
    joehohn is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    4
    Quote Originally Posted by alansidman View Post
    In your code, insert a line of code to SetFocus to the control you wish to have Access set to after the DoCmd line.

    DoCmd.GoToRecord , , acNext
    Me.NameofYourField.SetFocus
    Thank You for your reply.

    The old behavior (Office 2007) was that the NextRecord would stay wherever you were vertically in the previous record. Whether you were half way down the form, three fourths of the way down or at the bottom. The form is long enough that specifying a particular field for "focus" will not always be appropriate.

    Thank You again,

    --JoeH

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

Similar Threads

  1. Replies: 8
    Last Post: 05-10-2012, 10:57 AM
  2. Get position of record in continuous form
    By Whizbang in forum Forms
    Replies: 3
    Last Post: 11-02-2011, 01:47 PM
  3. Scroll bar position in main form
    By VictoriaAlbert in forum Forms
    Replies: 1
    Last Post: 10-25-2011, 04:24 PM
  4. Set Form Position
    By Yance in forum Programming
    Replies: 3
    Last Post: 11-29-2010, 02:20 PM

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