Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting an unindexed table upon a form

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I recently posted a question concerning sorting a table upon a form. The response I recieved involved using the indexes of the table to sort. However, the table that I am attempting to sort is not indexed.

I have used some simple code to open the sort dialog box, but Paradox rightfully tells me that the specified table is in use (by the form).

Has anyone got any ideas as to how I can get around this problem?

Thanks,

Woody.
 
Woody,

Hm. Is this an Answer table? If so, then it's best to have the query sort the results while it's generating them. You can automate this (and make it more flexible) by placing the sort information into a variable and inserting that into your query at runtime.

Alternatively, you can remove the table from the data model, sort it, and then add it back. See the Help on dmAdd and it's related procedures.

Finally, you could copy the existing table to a new one, sort it, and then open the same form using the newly sorted table as the MasterTable. shows the basic technique, though you'll want to look at the FormOpenInfo structure instead of the ReportOpenInfo structure.

Ideally, you should be using indexes tables whenever possible. The performance improvements can be extremely impressive, especially when dealing with large data sets.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top