469,625 Members | 1,720 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Sort Order in SubForm, Access 97

I have a subform attached to a main form. The linkage is from the main Id
which is also a field in the table from which the subform is built. The table
contains four fields, the main id, a date, a transaction type, and a note
field. The first three combined are the Primary Key of the table, with the
date defined as descending. When I open the table, the records are sorted
correctly with the date in descending sequence. However, when I open the
form, either stand-alone or as a subform, the descending sequence of date is
not maintained. I've tried specifying the date in the Order By field of the
form (subform), but I still don't get the proper sequence. Any suggestions
would be appreciated.

Nov 12 '05 #1
1 2397
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When I wanted to sort a subform I've found it easier to put an SQL
string in its RecordSource instead of using the OrderBy property.
E.g.:

SELECT * FROM <table name> ORDER BY TransDate Desc

HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP9jr3oechKqOuFEgEQJcHwCghGEgLPWg/7XKQdlBeFfPfwfe3tUAnjL3
Xi9gvXsILdw+sCsox2ZxV4K5
=O9xk
-----END PGP SIGNATURE-----

phony wrote:
I have a subform attached to a main form. The linkage is from the main Id
which is also a field in the table from which the subform is built. The table
contains four fields, the main id, a date, a transaction type, and a note
field. The first three combined are the Primary Key of the table, with the
date defined as descending. When I open the table, the records are sorted
correctly with the date in descending sequence. However, when I open the
form, either stand-alone or as a subform, the descending sequence of date is
not maintained. I've tried specifying the date in the Order By field of the
form (subform), but I still don't get the proper sequence. Any suggestions
would be appreciated.


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by usaccess | last post: by
2 posts views Thread by Chris | last post: by
7 posts views Thread by wwwords | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.