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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement