Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Views and SEEK
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00029325
Message ID:
00029333
Vues:
23
>>I have a grid in a form.
>>The grid displays a view.
>>I want to seek for employee name in the
>>view.
>>I have tried locate but it only returns the first
>>occurens of the name.
>>
>>Before I used seek and then the names were
>>seeked one after another.
>>
>>Is it possible to INDEX a view??
>>
>>How to solve this problem:
>>My code in the find button is:
>>ANT=LEN(ALLTRIM(UPPER(THISFORM.ansatt.value)))
>>LOCATE FOR SUBSTR(viewansskift.ansnavn,1,ANT)=ALLTRIM(UPPER(THISFORM.ansatt.value))
>>recnr=RECNO()
>>IF NOT BOF()
>> IF NOT EOF()
>>GOTO recnr
>>ENDIF
>>ENDIF
>>THISFORM.Refresh()
>>THISFORM.Grid1.SetFocus()
>>
>>Best regards
>>
>>Per Simmersholm

Well, let's try this again with an actual MESSAGE written.

Per, you can index a view just like a table. There was a thread about this in the last couple of days.

Also, check out 'CONTINUE' which is used to find the second, third.... instances of whatever you were LOCATING.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform