Versions des environnements
Fabio:
My solutions seem to be working fine. Both of them involved creating a RowSource_Assign method and putting code in it. Here is what my code now looks like:
LPARAMETERS vNewVal
*Notejk: To make sure that m.vNewVal is Table.Field
IF !"."$m.vNewVal.AND.!"->"$m.vNewVal.AND.!EMPTY(m.vNewVal)
m.vNewVal = ALLTRIM(m.vNewVal) + "." + ALLTRIM(FIELD(1, m.vNewVal))
ENDIF
THIS.RowSource = m.vNewVal &&Notejk: So the ListCount works in the next line
IF This.ListCount < This.ListIndex &&Notejk: To make sure that they don't go out of sync
This.ListIndex = 1
ENDIF
This.Enabled = (This.ListCount > 1) &&Notejk: To solve problem 1
*Notejk: To prevent infinite loop and avoid changing empty RowSource
IF !"STRTR"$This.RowSource.and.!EMPTY(This.RowSource)
This.RowSource = "STRTRAN(" + m.vNewVal + ", '|')" &&Notejk: To solve problem 2
ENDIF
Jerry Kahn
Précédent
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