473,574 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2560
-----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:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBP9jr3oechKq OuFEgEQJcHwCghG EgLPWg/7XKQdlBeFfPfwfe 3tUAnjL3
Xi9gvXsILdw+sCs ox2ZxV4K5
=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
4069
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 view). The main form holds the parent records. For each parent record there are 10 (and always 10) related records. When these 10 records appear...
12
18997
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, frmBrowseNegsSubform. I would like to perform an ascending or descending sort on any of the 7 columns shown in datasheet view in the subform control. I've...
2
4623
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 box (query row source and multi-select turned off) and a datasheet subform. The short cut menu for the datasheet subform includes standard sort...
3
5933
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 then "cancelled" Then within those cases it should sort by priority. I know how to sort ascending and descending on forms.
2
2523
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 with the intention that the sort order is retained. This works fine in an mdb file but with an mde the form sort order is not saved. To work...
7
7880
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 arrow on the subform header (the one that should bring up the sort and filter menu) I get this error:
3
1969
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 sort by the date of the transaction on Subform1. I have set the "order by" field to sort descending by date but it's acting funky (sometimes it is...
3
1410
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 sort by the date of the transaction on Subform1. I have set the "order by" field to sort descending by date but it's acting funky (sometimes it is...
2
2167
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 toolbar buttons are not available. I also tried a custom toolbar, but they are disabled there too. It seems odd, because when the same records are...
0
7764
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8111
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8274
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7863
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6514
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5336
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3776
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1375
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1102
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.