Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving record pointer in listbox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00063997
Message ID:
00064870
Vues:
62
>>>>Hi, I was flustered in attempting to have a listbox scroll down thru some records(ccpay98.dbf) and have an adjacent editbox display the matching records from another dbf, linked, of course, on a common field.
>>>>Using "THISFORM.MYEDITBOX2.VALUE=STR(CCPAY98.TOT_COST)" works only to display the dbf the listbox is using.
>>>
>>>When you scroll down, you didn't change Listbox.Value yet. It will happen only if you click on another item, then Listbox.Value will change and you can fire Thisform.Editbox.Value=... from Listbox.InteractiveChange event.
>>
>>Right, but how/where do I set Thisform.Editbox.Value to equal a corresponding value from dbf #2
>
>Do you use DE temp relationships? If yes, then moving pointer in Listbox.Rowsource (checked in InteractiveChange) will invoke moving pointer in table related to Rowsource. BTW, it's more reliable not to use temp relationships, and just perform SEEK() in Listbox.InteractiveChange in second table.

I have fought the same battle. To reliably display the value in a related table,
I seek the child table and return the value to whatever control I'm using. Found
that temp relations don't always move the record pointer in the related table.

IF SEEK(lcListBox.key,'ChildTable','primary')
THISFORM.txtChild.VALUE=ChildTable.Key
ELSE
THISFORM.txtChild.VALUE=""
ENDIF

Something like the above might work. Hope this helps.
Randy Barnett
Ascension Capital Group
Arlington, Texas USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform