Really? Cannot beleive that. Again, do you have much code in grid? I would like to see that form.
Also, is that alias related by a SET RELATION mode or by relation in the form's data evironment?
It would be good if you will make a simple test first and see if it works. If it works for you, then something in the form's code prevent correct behaviour.
I still beleive that some code inside of the grid is moving record away or cause another filtering. BTW, you can check this after your code running:
Select 4
set filter to
set key to
set order to company
locate
thisform.grid.refresh
thisform.grid.setfocus
=Messagebox("Filter is: " + SET("FILTER") + "; KEY is: " + SET("KEY"))
You can also send me a sample form if you will be able to prepare it as a single something, and I will try to determine why it does not works.
>The record does not seem to be moving with the following code:
>
>Select 4
>set filter to
>set ket to
>set order to company
>locate
>thisform.grid.refresh
>thisform.grid.setfocus
>
>wait window str(recno()) This line gives me "10001" on a 10,000 record table.
>
>Jeff
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.