Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursors in Grids
Message
De
17/07/1999 11:42:37
 
 
À
17/07/1999 08:48:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00242682
Message ID:
00242736
Vues:
29
Hi Jeffrey.

Me again (s). As I said earlier, I don't use SQL as RowSOurceType for my grids, so I couldn't resist playing with it and I think I have an even simpler answer for you.

I don't know if your control into which the user enters an id is a text box or a combo box. It would probably be easier for the user if it were a combo box, but this code will work regardless of which one you use.

Set the grid's RowSourceType to 4-SQL Statement.

Put this in the grid's RowSource:

SELECT .F. AS PICK_DEL, CDC_ID, SPECNO, UNIQKEYSAS, UNIQKEYBAY ;
FROM CDCHIV WHERE CDC_ID = This.Parent.Text1.Value INTO CURSOR TEMP_HIV

Now, to make it work, put this code in the valid of your combo or text box used to enter the id:

LOCAL lcSQL

lcSQL = This.Parent.Grid1.RecordSource
This.Parent.Grid1.RecordSource = lcSQL

I just tested it with data of my own and it displays the correct data in the grid.

Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform