Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text1.InteractiveChange Lookup In Table
Message
De
25/02/1998 11:51:33
Jeff Tucker
Mackinac Center For Public Policy
Midland, Michigan, États-Unis
 
 
À
25/02/1998 11:17:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00081082
Message ID:
00081116
Vues:
20
>>I want to be able to type in a text box and as I type dynamically update the contents of a grid to bring me closer to the record for which I am searching.
>>
>>I have tried the following and it is not working. I have a textbox, a dropdown list box, and a grid populated by a view.
>>
>>The dropdown list box indexes and orders the view.
>>
>>Then in the textbox.InteractiveChange event I have the following code:
>>
>>SEEK this.value
>>thisform.refresh
>>
>>
>>After running the form I begin to type in the textbox. It appears that the pointer is being moved to appropriate records but the grid's verticle scroll bar tab shoots to the bottom, and "shakes" every time I type another letter.
>>
>>When I press another page on my page frame they are empty. If I click in the grid, the whole form successfully updates to reflect that the pointer has been moved to the record I clicked.
>>
>>Any help would be great.
>
>Does seek really find a record ? You might need to use something like =seek(trim(this.value),myTable,myIndex).
>Cetin

Yeah, I think SEEK is what I want here, because it moves the pointer. I am not actually trying to see if record exists, but rather move the pointer ever closer to a record, because each keypress narrows in on the appriate result.

Syntax
SEEK eExpression
[ORDER nIndexNumber | IDXIndexFileName
| [TAG] TagName [OF CDXFileName]
[ASCENDING | DESCENDING]]
[IN nWorkArea | cTableAlias]
Searches a table for the first occurrence of a record whose index key matches a general expression, then moves the record pointer to the matching record.

For instance, if I was to search for the Lastname "Turner". I would use the popup to order by lastname, then I would start typing in the text box. When I type a "T" the desired result would be that the first, alphabetically, record starting with a "T" in the lastname field would appear at the top of my grid and all the other T's would follow underneath. When I type "u" then the first "Tu" record should appear and so on depending on how far I need to go until Turner is visible at which point I would click on Turner and look at other pages in my page frame.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform