473,388 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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 2549
-----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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Deano | last post by:
Hi, I was just setting up a test system on a client's machine yesterday and as ever noticed a few problems. One that has thrown me is to do with the order of records in a subform (datasheet...
12
by: MLH | last post by:
I have created two forms: frmBrowseNegsMainform and frmBrowseNegsSubform. I put a subform control on the first of these. The SourceObject property for the subform control is, of course,...
2
by: Tim Marshall | last post by:
The following is happening in two instances in A2003. The one I s\describe is the easiest one. Theme controls and autocorrupt have been turned off long ago. An unbound main form with a list...
3
by: usaccess | last post by:
Hi, I have a form/subform. There is a priority field and then a case status field. I want to display records so that it sorts by case status as "actives" then "on holds" then "completes" and...
2
by: Chris | last post by:
Dear All, I have a subform in datasheet view whose record source is a table (not a query) A user can right click and customise sort order. Now when the form is closed VBA code saves for subform...
7
by: wwwords | last post by:
I have a form in Access 2007 containing a subform. The control source of the latter is SELECT DISTINCTROW ., ., ., ., . FROM ; which is undoubtedly correct. However, if I click on the down...
3
by: bbatson | last post by:
Suppose I have a form named Form1. On Form1 there is a subform named Subform1. Subform1 shows all transactions (and the date of the transactions) for the customer selected on Form1. I am trying to...
3
by: bbatson | last post by:
Suppose I have a form named Form1. On Form1 there is a subform named Subform1. Subform1 shows all transactions (and the date of the transactions) for the customer selected on Form1. I am trying to...
2
by: Element | last post by:
I have a master form with a simple subform that displays line items in datasheet mode. Everything works fine, except that when the subform has the focus, the standard Access sorting and filtering...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.