M
Michael Rodriguez
I have a basic customer data entry screen where the sort order is customer
name. Given a customer's ID#, I need to find the position of that record in
the list that is sorted by name, i.e. in the form's currency manager. In
order to move the record on the screen to the record I want, I would need to
something like myCurrencyManager.Position = 3.
As an example, suppose I want to find customer #1 (Amy) in the following
customer records:
ID# Name
3 Bill
4 Bob
1 Amy
2 Susy
I know how to find a record based on the id#. Just create a dataview, sort
it by id#, and find the given value. The problem is, when the dataview is
sorted by id#, finding id=1 will return the position in the dataview, which
when sorted by id# will be position #1. When the list is sorted by name,
the record I want is really in position #3.
Given the above data, what code can I use to tell me that the record with id
#1 is in position #3 when the list is sorted by name? Am I missing
something really obvious here?
TIA,
Mike Rodriguez
name. Given a customer's ID#, I need to find the position of that record in
the list that is sorted by name, i.e. in the form's currency manager. In
order to move the record on the screen to the record I want, I would need to
something like myCurrencyManager.Position = 3.
As an example, suppose I want to find customer #1 (Amy) in the following
customer records:
ID# Name
3 Bill
4 Bob
1 Amy
2 Susy
I know how to find a record based on the id#. Just create a dataview, sort
it by id#, and find the given value. The problem is, when the dataview is
sorted by id#, finding id=1 will return the position in the dataview, which
when sorted by id# will be position #1. When the list is sorted by name,
the record I want is really in position #3.
Given the above data, what code can I use to tell me that the record with id
#1 is in position #3 when the list is sorted by name? Am I missing
something really obvious here?
TIA,
Mike Rodriguez