>>I have a gird, with a column with a check box... User selects records to process via checkbox. Then user presses a button to process the records selected.
>>
>>Once completed I would like to return to wher user left off.
>>
>>This is what I'm presently doing and the result.
>>
>>Prior to processing, which is done via a tableupdate, i move the record pointer 1. I get the primary key for this record.
>>2. I do the update.
>>3. I locate the primary record. (via a seek(lnPrimaryKey,table,pkindex)
>>4. then I set focus to the grid.
>>
>>The problem is the grid gets focus at the top of the grid, not where user left off.
>>
>>(If I look in debugger, prior to the setfocus call of the grid, the record pointer is on the record. Once the grid.setfocus is called, the record pointer points to the first record and that's where the grid is.)
>>
>>Mike
>
>
>Might try this - pretty much the same as what you're doing already but with a grid.refresh()
> update -- as Namoi said - be sure that you're actually getting the correct value in step 1.
>
>1. get primary key for record
>2. do the update
>3. SELECT the table/view that is the data source for the grid
>4. Do the seek
>5. run the .refresh() method of the grid
>6. do a setfocus() on the grid
>7. (if necessary) run the .refresh() method of the form.
None of the above works :(
Here is the code that I'm using:
Select Dispatch
Go LcPlace In Dispatch
SKIP
LcInvId = Dispatch.InvoiceNo
=TableUpdate(.T.)
thisform.RequeryDispatch()
=Seek(LcInvId,"DISPATCH","INVOICENO")
thisform.Refresh()
Any other ideas?
Mike