• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Keep current record current after sort

I have a continuous subform that is sorted by ProjID. ProjID is bound to a combo box that is used to select a given project number. When  the project number is changed, the location of the record in the continuous form shifts to meet the sort criteria (after a requery to populate the rest of the data for the record based on the project ID).

Is there a way to highlight (select) the record that was altered so as to not have to search for the new project in the list?

1 Solution
Rey Obrero (Capricorn1)Commented:
before the requery of the form, assihn the current record in a variable, the use FindFirst to get back to the record

dim varID
varID= me.recID

'requery the form

with me.recordsetclone
    .findfirst "[recID]=" & varID
    if not .nomatch then
   end if
end with

walkingbushAuthor Commented:
Awesome! Worked perfectly.
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

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

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