Hi João,
I think I misunderstood your original question. Now I see what you want to achieve. It could be done in several ways, I think. The simplest way, I believe, is to use Private DS for the first form and Default DS for the second, in this case these two forms will share the same DS.
Now do in the second form texbox.valid (or LostFocus is better)
thisform.Search()
Assume you're in the right work area (otherwise do Select MyTable)
thisform.Search method
local lcName, lnRecno
lnRecno=RECNO()
lcName=alltrim(upper(thisform.text1.value))
if seek(lcName,'MyTable','MyIndex')
else
=messagebox(lcName+' could not be found!,64,'Warning...')
go lnRecno
endif
thisform.grid1.SetFocus()
When you return on the first form, the record pointer is on correct record. You just need to thsiform.Refresh() to refresh info.
That's it. Simple, right?
There are several other approaches, but I think, this is the simplest. Let me know, if it's what you're looking for.
HTH
>Hi, Nadya,
>
>Your keyboard have 'ã' :), great american keyboard!!!
Yep :)))))) See BP reply other day on other thread, how can I write your name with all correct symbols :)
>
>Thank's for your time and idea. But i think i forgot something, this second Form have a TextBox where i input "JOAO" and it search the name in grid, what i want is, the pointer moves to the grid record, and when it encounters 'JOAO' i click in there, take the recno() and go to the first form.
>
>You idea take place here?
>
>Thank's
>
>João Batista
If it's not broken, fix it until it is.
My Blog