Solved

Sorting DAO Tables in VB

Posted on 2004-05-03
9
192 Views
Last Modified: 2010-05-02
Hi...
I've got an application developen in VB using DAO to open Access Database file. My problem is how to sort the record sets when thy are opened as a Table. Indexes can not be used in Table mode!
0
Comment
Question by:progex
[X]
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
  • 4
  • 2
9 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 10976452
How do you assign your table to the dao-recordset ?
Otherwise you can give it a order by clause when you open your recordset:

rs.open "select * from yourTable order by YourField"
0
 
LVL 1

Author Comment

by:progex
ID: 11002889
well, i'm using the opendatabase function of the database object to open the recordset and set it to the record set object as follows:

set data_rs = data_db.opendatabase("database name", "table name, dbOpenTable)

no sorting option in here!!!
:(
0
 
LVL 1

Author Comment

by:progex
ID: 11002895
isn't there a method with the recordset object to reorder the table??
What about the sort methord of the recordset object???
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Accepted Solution

by:
Dhaest earned 300 total points
ID: 11002903
set data_rs = data_db.openrecordset("select * from tableName order by YourField", dbOpenDynaset)
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 11002928
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 11422982
My recommandation: answered by Dhaest, because there was no reaction after my comment, so I guess that it the asker was satisfied about my comment.
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

Suggested Solutions

Title # Comments Views Activity
Windows 10 start screen issues 9 62
Copy a row 12 70
Getting warning: You are about to delete 1 row(s) 9 54
VB script to continue despite error 2 55
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

730 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