Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 12th, 2008, 04:00 AM
Authorized User
Join Date: Feb 2008
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hewstone999
Default SORTING an table

I currently have this data in the "tbl_Infor" Tbale

Tlb_name RowNo Comments
MPI 1 Username
MPI 2 Forename
MPI 5 Date
MPI 3 ****
MPI 4 Address
LRD 1 Car
LRD 4 Year
LRD 2 Make
LRD 3 Colour

I need a sort function in vba or an SQL statement that will sort the table in order of row number (See below)

Tlb_name RowNo Comments
MPI 1 Username
MPI 2 Forename
MPI 3 ****
MPI 4 Address
MPI 5 Date
LRD 1 Car
LRD 2 Make
LRD 3 Colour
LRD 4 Year

Any ideas on how this can be done thanks.

Reply With Quote
  #2 (permalink)  
Old June 12th, 2008, 09:35 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

In general the SQL statement would be something like


Caution: Don't use reserved words and functions as field names. Currently you have DATE and YEAR as fields. Change those. They will cause problems later if you leave them as is.

Also, you have a field called ****. Is that for real or are you hiding something from us for security reasons? If that's the real name, change that, too!

Avoid spaces in field names. Change TAX DATE to TAX_DATE or dtmTaxDate, etc.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Collapsible table sorting problem sendkamal Javascript 0 February 27th, 2007 12:33 PM
FSO dynamic table sorting nancy Classic ASP Components 0 August 24th, 2005 12:46 PM
Datagrid sorting by non alphabetical sorting? LLAndy VS.NET 2002/2003 1 July 15th, 2004 01:20 AM
XML to HTML Table with Sorting and Distinct VictorMk XSLT 4 April 23rd, 2004 06:29 PM
size of table (type table is table of number) MikoMax Oracle 1 November 19th, 2003 03:11 AM

All times are GMT -4. The time now is 01:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.