Viewing the current record after requery a form

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
 
K

Klatuu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top