Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Caption Refresh
Message
De
10/08/1998 14:46:37
 
 
À
10/08/1998 12:26:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00125292
Message ID:
00125377
Vues:
11
Hi Trisha ---

Since Labels don't have Refresh method (the ideal place to change the Caption), Put...

THIS.lblAmount.Caption=IIF(credit,"Credit","Debit")

...within the Form's Refresh. An IIF() condition directly in the Caption property will only be evaluated once, on Init, and never again. That is why it isn't working.





>I have a label on my form that I would like to control the caption based on the value of a field in a table. The label has the correct value in the 1st record, but the caption does not change when the form is refreshed with a new record. However, I have noticed that when I return to design mode the caption appears to be have the value of the last retrieved record. Am I missing something?
>
>Here's my code:
>
>lblAmount Caption - IIF(credit, "Credit", "Debit")
>
>cmdNext Refresh - SKIP 1 IN detail
> IF header.batchno <> detail.batchno OR
> header.glseqno <> detail.glseqno
> SKIP 1 IN header
> ENDIF
> ThisForm.Refresh
>
>TIA for your help. :)
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform