February 28, 2021
Hot Topics:

Visual Basic Database Tutorial - Part 3

  • By Karl Moore
  • Send Email »
  • More Articles »

OK, so you've produced that list of customers - and now your boss wants them in alphabetical order. Argh! Don't you just want to murder picky users?

Still, once again, Microsoft Access can help out.

Change the query we created in the last section to look like the below. I've simply removed the "France restauration" criterion and changed the "Sort" box to "Ascending"

Now run the query by entering into Datasheet View. You should find that all the companies are now listed in alphabetical order.

The SQL statement for this looks like:

SELECT Customers.CompanyName, Customers.ContactName
FROM Customers
ORDER BY Customers.CompanyName;

You can even reverse that order by changing 'Ascending' to 'Descending'.

Page 4 of 10

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date