How do I get split form to go to a specific record after processing the after update event?

Posted on 2008-11-10
Last Modified: 2012-05-05
I have created a form with a combo nbox that allows users to nominate the status of a record. When they change the status I need to do some processing on the record, requery the form (as the record list may have changed) and return focus to the record that the user was working on. I have created the After Update event but I cannot get it to go back to the desired record so I have gone backwards and found the offending line of code but I still don't understand why this happens or, more importantly, how to fix. Following is the stripped down code that won't work. Basically if I step through the code it seems to work as it should finding and bookmarking the record but when it has finished running the form's focus is on the first record not the one that I want.
    Me.Dirty = False     'save changes
    lAssignmentId = 3646    'I have manually entered here but in my full code this is set by code
    Me.Form.Requery      'this appears to be the offending line. If I remove it the desired record remains in focus
    'move record pointer to appropriate record

    If Nz(lAssignmentId, 0) <> 0 Then
        Set rs = Me.RecordsetClone
        rs.FindFirst "AssignmentId = " & lAssignmentId
        If Not rs.NoMatch Then
            Me.Recordset.Bookmark = Me.RecordsetClone.Bookmark
        End If
    End If
Question by:Rob4077
    1 Comment

    Accepted Solution

    Please ignore question

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now