Wheelie,  you need to open your recordsets using SQL, rather than open 
the tables directly even if you need to use all of the fields in the 
table on your form.  Simple SQL such as 'select * form MyTable orderby 
Myfield descending' replacing MyTableName will do the sorting in the SQL 
engine and return sorted recordsets.

With such a small table as you have, it is not as critical, but SQL 
sorting really works at it's best when you use indexed fields to sort 
by. Although be wary of having to many indexes on a table, the overhead 
of maintaining the multiple indexes can be counter productive if the 
table is having many add and delete operations being undertaken. .

Matt

wheeliegirl wrote:

>Hi Everyone:
>
>I am doing my workterm for an IT Diploma. This is my first time out in 
>the field as a programmer. I am creating a program for an orgnaization 
>using VB6 and MS Access 2000.
>
>There are many tables and forms in the program that I am creating. one 
>of the tables has over 300 records in it. Wht is the best way for me to 
>ensure that the records are sorted when I open the VB GUI and Display 
>the records. In one of my VB6 forms I want to sort the data according 
>to last name and in another form I want to sort the data by ID Number.
>
>
>I have a Project Module in VB as well if that will help answer my 
>question.
>
>Tahnk you for any help anyone can give me.
>
>
>
>
>
>
>
>
>'// =======================================================
>    Rules : http://ReliableAnswers.com/List/Rules.asp
>    Home  : http://groups.yahoo.com/group/vbHelp/
>    =======================================================
>    Post  : [email protected]
>    Join  : [EMAIL PROTECTED]
>    Leave : [EMAIL PROTECTED]
>'// =======================================================
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>



'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to