Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid (rows Click() event )
Message
 
 
À
21/03/2000 22:28:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00348655
Message ID:
00348718
Vues:
25
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() && Current record pointer

 lcName=alltrim(upper(thisform.text1.value)) && assume it's character

 ** if MyTable has the required order use seek, otherwise - locate for
 if seek(lcName,'MyTable','MyIndex') && record was found
   * Nothing to do - record pointer now on the right record
 else
   =messagebox(lcName+' could not be found!,64,'Warning...')
   go lnRecno && Return back (not found)
 endif
 thisform.grid1.SetFocus() && Notice, the record pointer now is the found  record 

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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform