none
Navigating to next record on continuous form... RRS feed

  • Question

  • I have a continuous form for which I'm trying to tab from one record to the next.  I have the following code...

    Form_BeforeUpdate(Cancel As Integer)

    crid = Me.CurrentRecord
    Cancel = True
    Me.Undo
    .

    .

    .

     Me.Requery
     DoCmd.GoToRecord , , acGoTo, crid + 1

    However, when I do this, rather than taking me to the next record, it's taking me to the last record on the form.

    Any suggestions?


    Thanks for your help!!

    Wednesday, August 30, 2017 1:22 PM

Answers

  • Disregard - I'm on to re-architecting my solution.


    Thanks for your help!!

    • Marked as answer by plynton Wednesday, August 30, 2017 3:11 PM
    Wednesday, August 30, 2017 2:38 PM

All replies

  • Disregard - I'm on to re-architecting my solution.


    Thanks for your help!!

    • Marked as answer by plynton Wednesday, August 30, 2017 3:11 PM
    Wednesday, August 30, 2017 2:38 PM
  • Hi,

    If you're record source is sorted, maybe the current record value could change when you requery the form. Have you tried a more conventional way such as:

    crid = Me.ID
    Cancel = True
    Me.Undo
    ...
    Me.Requery
    Me.Recordset.FindFirst "ID=" & crid
    DoCmd.GoToRecord , , acNext

    Just my 2 cents...

    Wednesday, August 30, 2017 2:40 PM