?
Solved

Keep current record current after sort

Posted on 2009-04-29
2
Medium Priority
?
221 Views
Last Modified: 2013-11-28
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?

Thanks!
Michael
0
Comment
Question by:walkingbush
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1600 total points
ID: 24262864
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
        me.bookmark=.bookmark
   end if
end with



0
 

Author Comment

by:walkingbush
ID: 24264054
Awesome! Worked perfectly.
 
Thanks!
Michael
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question