473,497 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sorting in Forms

2 New Member
Hi,

I am new to this forum and also a learner for access and have a
question for the access experts.
I've build a small access database containing personnel details.
I have created several tables, queries and forms (including subforms).
The data in the subforms are displayed in an ascending way (starting with 2001 upto 2006). I want to see the last record first. I've sorted the tables (which display in descending way) the queries (also decending). However, in the subform it remains ascending. I've sorted the form descending and saved the database, but on close and open is again is ascending. How do I fix this?
Nov 3 '06 #1
3 1505
NeoPa
32,556 Recognized Expert Moderator MVP
What is set as the :
Record Source?
Filter?
Order By?
Allow Filters?

Give values for main and sub-forms if possible.
Nov 3 '06 #2
WimKoene
2 New Member
Dear NeoPa,

Thanks for responding. Fortunately someone just dropped in today who showed me that, when clicking in the form in design mode, and selecting the properties for the complete (sub) form, you can modify and define a query as record source with the following:
SELECT * FROM [Illness Details] ORDER BY [Illness Details].Illness_Mutation_Year DESC , [Illness Details].Illness_Mutation_Month DESC , [Illness Details].Illness_Mutation_Day DESC;
I thought that the sort function would be activated from the query on which the form was based (which was not the case)
So the problem is cured and I have learned something again.
Nov 3 '06 #3
NeoPa
32,556 Recognized Expert Moderator MVP
Now I can see what you want, you're better off setting the :-
Expand|Select|Wrap|Line Numbers
  1. Record Source property to
  2.     [Illness Details]
  3. Order By property to
  4.     [Illness Details].Illness_Mutation_Year DESC,
  5.     [Illness Details].Illness_Mutation_Month DESC,
  6.     [Illness Details].Illness_Mutation_Day DESC
This will make it better organised and easier to understand and maintain.
Your 'someone's code would work fine though.
Nov 3 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1725
by: rmorvay | last post by:
I have successfully integrated sorting in the listview control with the following code: Private Sub ListView_ColumnClick(ByVal sender As Object, ByVal e As...
7
3231
by: Federico G. Babelis | last post by:
Hi All: I have this line of code, but the syntax check in VB.NET 2003 and also in VB.NET 2005 Beta 2 shows as unknown: Dim local4 As Byte Fixed(local4 = AddressOf dest(offset)) ...
2
2333
by: Raj | last post by:
Hi, When we are sorting the DataGrid Boolean column the grid is becoming redcross. I have my own PPMIPDataGridBoolColumn class inherited from System.Windows.Forms.DataGridBoolColumn. In this...
19
25422
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
0
3211
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
3
6612
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be...
8
2185
by: sara | last post by:
Hi - I have looked at all posts and tried both Allen Browne's Report Sorting at run Time ( Select Case Forms!frmChooseSort!grpSort Case 1 'Name Me.GroupLevel(0).ControlSource = "LastName"...
1
2164
by: Ahmed Yasser | last post by:
Hi all, i have a problem with the datagridview sorting, the problem is a bit complicated so i hope i can describe in the following steps: 1. i have a datagridview with two columns...
2
2430
by: win | last post by:
The SortKey of VB6 is not in .Net. Can I still do sorting using a listview? Thanks
4
1839
by: rajtalent | last post by:
hi all, I want to sort the colum when clicks the columnheader using vb.net 2005 .But i receive the following error "Error 1 Overload resolution failed because no accessible 'New' accepts...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
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...
0
7160
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
7196
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
5456
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,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
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...
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.