Solved

How to sort boolean field MS Access

Posted on 2009-06-29
4
314 Views
Last Modified: 2013-11-28
I am trying to display data in a combobox on a form so that I can see the data sorted. see image 1
I would like to be able to do a sort on the boolean fields first so that the false fields are at the top and the true at the bottom.
I would then like to sort on the job name within the boolean field groups of true and false.
I can sort the data on the job name but it doesnt seem to work for the boolean fields.
How would I do this?
trueFalse.jpg
0
Comment
Question by:funkimunky
  • 2
  • 2
4 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 24734252
What is the rowsource of the combobox (sql view please)?
0
 

Author Comment

by:funkimunky
ID: 24734462
The SQL code is below
SELECT tbl_jobName.ID, tbl_jobName.jobName, tbl_jobName.jobDescription, tbl_StaffMember.KnownAs, tbl_jobName.jobComplete
FROM tbl_StaffMember INNER JOIN tbl_jobName ON tbl_StaffMember.ID = tbl_jobName.jobOwnedBy
ORDER BY tbl_jobName.ID, tbl_jobName.jobComplete;

Open in new window

0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 24734478
This is sorting by ID first and then jobComplete;
just edit line 3 of the sql to ....
ORDER BY tbl_jobName.jobComplete, tbl_jobName.ID ;
0
 

Author Closing Comment

by:funkimunky
ID: 31597822
I cant believe it was that simple, points well deserved.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question