How to make a form with multiple sort criteria

kannon

Registered User.
Local time
Today, 12:52
Joined
Apr 18, 2009
Messages
12
Hello - inexperienced Access user here.

I have a database that I need to sort on 3 key data points - actual start date, planned start date, project name. The database contains about 300 records.

What I would like to do is the following:

1) first sort on all records that have an actual start date (Is Not Null) and within that group list them in ascending order of actual start date.

2) then sort on those records with no actual start date (Is Null) and within that group sort in ascending order of planned start date.

3) finally then list those records with no actual start date, no planned start date, and then ascending order of project name.

My problem is when I do my first sort criteria (i.e., actual start date Is Not Null) I lose all the remaining data. Any help would be appreciated.

Thank you,

Kannon

--------------------------------------------------------------------------------------------

For instance, here is my basic data table.

Project Name Planned Start Date Actual Start Date

A project 4 Aug 10 3 Jun 10
B Project
C Project 12 Jun 10
D Project 2 Sep 10 1 Jun 10
E project 7 Jun 10
F Project


Desired Output in Form:

Projects Started:

Project D 2 Sep 10 1 Jun 10
Project A 4 Aug 10 3 Jun 10

Projects Planned to Start:

Project E 7 Jun 10
Project C 12 Jun 10

Projects Start Unknown:

Project B
Project F
 
Look at "DemoMultiSortA2000.mdb" (attachment, zip).
1) Make a new table with a "PKey" field (autonumber,
look at Table2New).
2) Make a 3 queries, (look at queries).
3) Make a 2 forms "MainForm" and "Form1New".
Look at VBA in the "MainForm".
4) open "MainForm" and click on the button.
5) But, if you want to update the records (in the Table1)
via "Form1New", then you have to add some VBA code
and an "Update" query.
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom