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

Grid Sorting Question

Status
Not open for further replies.

steve3739

Programmer
Jul 5, 2002
32
US
Hi,
I have a simple grid with a 5 field database as the record source. The following code is in the header of each column:
set order to ......
thisform.refresh
The grid changes order as expected, but the record pointer jumps to some other record. How do I keep the record pointer on the same record? (As a test, I tried putting the same code in command buttons, and the record pointer stayed on the same record as I wanted it to.)
Any help or suggestions would be very appreciated.

Thanks, Steve
 
try:
local xrecno
xrecno = recno()
set order to ......
thisform.refresh
go xrecno


lemme know if this helped.

kilroy [trooper]
 
Thank you torturedmind! I was putting the goto BEFORE refresh. Putting AFTER the refresh did the trick.

Thanks much for such a quick response, and have a good evening.

Regards,
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top