I
IzmTest
I hope some of the knowledgeable folks here can answer this question:
When moving to the next record, the DoCmd seems to utilize the table's
primary key, as in
DoCmd.GoToRecord , , acNext
So if the Primary key is on the field MemberID, for example, that will
be the order employed for all such record moves (next, previous, etc).
However, sometimes I need to move to the next record using another
ordering scheme,
say Lastname, FirstName.
I've tried setting the form's OrderBy property with
Me.OrderBy= "tblMember.LastName,tblMember.FirstName"
and then invoking DoCmd.GoToRecord , , acNext but this seems to
have no effect.
(I have an index set on tblMember.LastName,tblMember.FirstName).
Is there a way to move to the next (or previous) record using an
alternate ordering instead of the primary key,
e,g. LastName,FirstName?
Thanks in advance for any help you can offer.
IzM
When moving to the next record, the DoCmd seems to utilize the table's
primary key, as in
DoCmd.GoToRecord , , acNext
So if the Primary key is on the field MemberID, for example, that will
be the order employed for all such record moves (next, previous, etc).
However, sometimes I need to move to the next record using another
ordering scheme,
say Lastname, FirstName.
I've tried setting the form's OrderBy property with
Me.OrderBy= "tblMember.LastName,tblMember.FirstName"
and then invoking DoCmd.GoToRecord , , acNext but this seems to
have no effect.
(I have an index set on tblMember.LastName,tblMember.FirstName).
Is there a way to move to the next (or previous) record using an
alternate ordering instead of the primary key,
e,g. LastName,FirstName?
Thanks in advance for any help you can offer.
IzM