Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to sort boolean field MS Access

Posted on 2009-06-29
4
313 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

809 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