title: Access: How can I display a new record in one form after creating in a second form
body: <p>Access 2007: I have one form with 100s of records displayed. I have a second form for editing or creating new records. When I return to the first form after adding a new record, I do On Activate: Me.Requery so the new record is added to the list, but I would like it to display on the screen with the record selector on the new record. Is there a way to do this? I am assuming that I save the ID in a global variable, but not sure what to do next. Thanks. </p>
  
  <p>RESPONSE:
  Thanks //t.  Your answer got me going in the right direction.  I will post my solution, which I think is more of a work-around.  There has to be a better solution, but this seems to work.  </p>
  
  <p>Form 1 (list) -> Form 2 (edit/new) and create new record. </p>
  
  <pre><code>Private Sub Form_Current ()
    glngID = Me.ID.Value
  End Sub
  
  Private Sub Form_Close
    gstrLastForm = "Form2"
  End Sub
  </code></pre>
  
  <p>When I close Form 2, Form 1 is active.</p>
  
  <pre><code>Private lngSelectedRecord as Long
  
  Private Sub Form_Activate()
    Me.Requery
    FindSelectedRecord
    If gstrLastForm = "Form2" Then
      DoCmd.GoToRecord acDataForm, "Form1", acGoTo, lngSelectedRecord
    End If 
  End Sub
  
  Private Sub FindSelectedRecord()
    ...
    Open recordset, move through records, increment counter, exit when ID found
    ...
    lngSelectedRecord = intCounter
    ...
  End Sub 
  </code></pre>