• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 22
  • Last Modified:

bound form does not update to the current record

Hi
On my app I have  a form / subform, but I am  using my own buttons to navigate through the  records.
The form is bound to a table and, on load it shows the correct record (the first one).
Then, when I click the button, I want to go to the next record, which it does as per the list of record keys it shows on the debug.print

However, the form controls remain as is  the beginning and the forme does not reflect the record in memory.

My relevant code is:

 
   With q01_pacienteSet
        .MoveNext
        If Not .EOF Then
            Debug.Print !IDpaciente
            Forms![_intData].frm_pacienteCurRec = !IDpaciente
            Forms![_intData].frm_IDpaciente = !IDpaciente
            Me.Requery
            Me.Repaint
            frmExameLista.Requery
        Else
            MsgBox ("Está no Registo Final")
        End If
    End With

Open in new window



what can I do?
0
João serras-pereira
Asked:
João serras-pereira
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The Me.Requery would refetch your form's recordset, and would put you on the first record. Remove that line and see if that solves the issue.
0
 
João serras-pereiraAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now