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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get rid of sorting in table frame? 2

Status
Not open for further replies.

novice001

Programmer
Jun 7, 2002
18
US
Hello All,
I probably do something very stupied, but I can't figure out what. I have a tableFrame connected to a table. Each line is a combo (I don't know if it's important). When I insert any value in there, the table is automatically sorted alphabetically and data is moved up, so that just entered value is not the last one anymore. How can I remove that sorting? I didn't specify directly any sorting in the table neither in the table frame. I don't need it, but can't figure out how to get rid of it :`-( Help me please...

 
If your table is has a key, then the table will automatically 'sort' based on that key.
HTH
 
Novice001,

OGriofa's right, if you're using a keyed table, it will automatically be sorted; it's one of the things that keys do.

If you're tempted to remove the key, you may wish to consider a different approach. Consider creating a secondary index that places the data in a more acceptable order and then saving your form with that index selected in the Order By section of the Format | Filter dialog box.

When you do this, Paradox display your data according the secondary index.

If you don't have a field (or set of fields) that order your data in a way you like, you could add a [DatePosted] timestamp field to the table, set its DEFAULT validty check to NOW, and then create a secondary index on that. If you then avoid placing or editing that field, it'll display the data in order of the initial post date, which is very similar to what you're looking for.

Hope this helps...

-- Lance
 
I think you may be referring to what is known as 'fly away', where the record moves away from the cursor position and finds its place in the table. To prevent that put the following code in the record's action event:

if eventInfo.id() = DataUnlockRecord then
action(DataPostRecord)
endIf


Mac :)

"Do not delve too deeply in the arts of your enemy and so become ensnared by them"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top