472,371 Members | 1,503 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 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 2502
-----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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...

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.