Viewing the current record after requery a form

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hi,

I'm trying to get code or setting on the current record view.
Each time when I update a record (rec A) into my form, I need to run a
Requery before I continue to the Date field. But after the Requery runs, the
redord has goes to the first record 9rec B) of the form and I need to search
for the record (rec A) to continue my data updating.

Are there anyway to view the current record after I requery the form?

Thank you.

Eric
 
Use the form's After Update event. In this example, the field [PrimeKey] is
the primary key of the table. and txtPrimeKey is the control on the form that
is bound to [PrimeKey]

Dim lngKeyValue as Long

lngLeyValue = Me.txtPrimeKey
Me.Requery

With Me.RecordsetClone
.FindFirst "[PrimeKey] = " & lngKeyValue
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
 
Back
Top