requery?

  • Thread starter Thread starter debpep
  • Start date Start date
D

debpep

I have a continuous form on which the user enters several
records. On the form heading, I have a text box which
counts the number of records entered. I would like the
text box to be updated each time a new record is entered.
I am not sure how to go about it. Would I requery the
form? I tried that, but may not have written it
correctly. Thank you.
 
Put the following in the AfterUpdate event of the form

Me.Requery
DoCmd.GoToRecord acActiveDataObject, , acNewRec

The last statement will move your cursor to a new record after the requery.
Otherwise the cursor will be in the first record displayed on the form.
 
Back
Top