>I am having some trouble with the set order command in one of my tables.
>
>ThisForm.DtKeyPress = DATETIME()
>ThisForm.dtMouseMove = DATETIME()
>SELECT atpowner
>
>SELECT atptanks
>
>SELECT atpsite
>SET ORDER TO OWNERID && OWNERID
>GO TOP
>
>This is in the Init of a form. Owner ID's are listed from 1 to 3500 or so. The records in the table are not in order. When I run this form, it always starts and 2 instead of 1. 2 is the first record listed in the table. This seems like such a simple problem, but nothing I am trying is working. This is a database I have taken over, so I am not familiar with some of the internal workings. Any suggestions?
Something is changing the order down the road. You may try to add Browse command (just to verify the order) right after GO TOP.
Could it also be that 1 is the deleted record in the table and you're running with SET DELETED ON?
If it's not broken, fix it until it is.
My Blog