Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing a form while returning to the next record 1

Status
Not open for further replies.

CSADataCruncher

Technical User
Feb 5, 2004
74
US
I have a form that shows job entry data for last week's work only. I've recently added a command button that runs an "update query" on the table used in the form but, in order to see the new data created by the update query, I must requery or refresh the form. My problem is, when I refresh the form, it always returns to the first record.

How can I refresh the form and either return to the current or next record in the form?

Thank you,
Peggy Neubert
CSA
 
You get the primary key from your current record, do a requery, then return to that record

dim myPK as long
myPk = me.somefield
'do your update query here
'Do a find first
me.recordset.findfirst "someField = " & myPK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top