Solved

How to sort boolean field MS Access

Posted on 2009-06-29
4
307 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
Comment Utility
What is the rowsource of the combobox (sql view please)?
0
 

Author Comment

by:funkimunky
Comment Utility
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
Comment Utility
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
Comment Utility
I cant believe it was that simple, points well deserved.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now