You can use your favorite social network to register or link an existing account:
Or use your email address to register without a social network:
Sign in with these social networks:
Or enter your username and password
Forgot your password?
Yes, please link my existing account with for quick, secure access.
No, I would like to create a new account with my profile information.
Today’s guest blogger is Daniel Lamarche. Daniel is the Training Director at ComboProjects, which specializes in providing custom training solutions in Microsoft Office products.
I always thought it was cool to be able to sort a list by clicking the column heading once, for ascending order then once more for descending order. A while ago I decided to tackle this feature in an Access form. The buttons above the field names are used to sort the list. The triangle pointing down means the column is in descending order. Clicking on it again will sort that column in ascending order and the triangle will be pointing up. Like you are used to. This project required a basic understanding of Access SQL and concatenating strings. When you configure the Listbox using the Row Source property to specify the data that will appear in the list you are in fact creating a SQL statement.
I always thought it was cool to be able to sort a list by clicking the column heading once, for ascending order then once more for descending order.
A while ago I decided to tackle this feature in an Access form.
The buttons above the field names are used to sort the list. The triangle pointing down means the column is in descending order.
Clicking on it again will sort that column in ascending order and the triangle will be pointing up. Like you are used to.
This project required a basic understanding of Access SQL and concatenating strings.
When you configure the Listbox using the Row Source property to specify the data that will appear in the list you are in fact creating a SQL statement.
Read the rest of the article and download a sample database here: http://www.comboprojects.com/articles/accSortingList/accSortingListbox.html
Comments: (5) Collapse
Nice study but why go to all that trouble when you can just use the form in datasheet view and it's built in?
Well for one I like the fact that the current row is highlighted which for many years Access guru had only clever techniques to do the same. I can double-click the row and have an event respond to it, you can't delete the data, it required no explanation and the buttons are just above the correct column, No toolbar, no ribbon, no fuss. I am sorry that this solution doesn't impress you that much but all my customers are very happy using this sort of Find form. Also when you type a character on your keyboard the selected row immediately jumps to the first entry (in the first column) starting with that letter. Finally I will add that the user knows at a glance on what field the list is sorted and in what order.
I've been using similar technique since A97 because users wanted to sort records in listboxes by various columns. So I add this functionality when I'm asked for. It would be very nice if this functionality was built in Access's Listbox... something like clickable header, see ListView in VB6.
This method is a little more advanced, but it gives you more control over the database than just using datasheet view. I've been using (teaching) a similar technique for years. You can also add text boxes above each of the columns to FILTER the results of the listbox by adding WHERE conditions to the SQL dynamically.
Richard, do you have a sample database detailing the "add text boxes above each of the columns to FILTER the results of the listbox by adding WHERE conditions to the SQL dynamically." technique?
Comments: (loading) Collapse