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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only