Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox in grid problems
Message
De
06/10/1997 18:15:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Listbox in grid problems
Divers
Thread ID:
00053462
Message ID:
00053462
Vues:
67
Help! Can somebody tell me what am I missing here?

I have a grid which has two related columns, the second is a listbox.
I am trying to set the rowsource of the listbox programmatically in it's dropdown event. The values in the list are determined by the value of the first field in the same row.

cboPayors.dropdown

LPARAMETERS nindex
*-- create a cursor for the Payor drop-down list of Owners of this Folio

lcFolio = THIS.parent.parent.column2.txtFolio_id.value
IF NOT EMPTY(lcFolio)
THIS.RowSource = ;
"SELECT F.OWNER_ID, O.LAST_NAME, O.FIRST_NAME FROM FOLIOOWNER F, OWNER O " + ;
"WHERE F.FOLIO_ID= '" + lcFolio + "' AND " + ;
"F.OWNER_ID=O.OWNER_ID INTO CURSOR cPayors NOFILTER"
=messagebox(this.RowSource)
ENDIF


From the messagebox, I can see that the value of txtFolio_Id being used to build the SELECT statement is NOT that of the currently selected row, but that of the previously selected row, despite the record mark indicating the current row.

How do I ensure I am using the value of the Folio_Id field which is on the same row as the listbox just clicked ??

A related Q - in some examples of drop-down lists I've seen, clicking on the field causes the list to drop, in others the use has to click on the down arrow. What is causing this difference in behaviour?

TIA for any suggestions,
Martyn Thomson
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform