Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeView key
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00319557
Message ID:
00319578
Vues:
9
>>Can any one tell me why this code will fail with out the appended "A" to lckey. CustView.CustId is a unique id field. Also I notice that a space is appended to the first line for lcKey???
>>What I am trying to do is to put the customer Id into the key of the treeview so when i click on the node i can show the customer info in a window...
>>
>>The error is invald key from nodes
>>
>>
>>WITH This
>>  .oleTreeview.ImageList = .oleImagesList
>>  FOR lnCnt = 65 TO 90
>>    .oleTreeview.Nodes.Add(,,CHR(lnCnt),CHR(lnCnt),"Closed","Open")
>>    DO WHILE ALLTRIM(LEFT(CustView.LName,1)) = CHR(lnCnt)
>>      * lcKey = ALLTRIM(CustView.CustId)
>>      * The above line will give an error and the below does not
>>      lcKey = ALLTRIM(CustView.CustId)+'A'
>>      lcText = ALLTRIM(CustView.LName)
>>      .oleTreeview.Nodes.Add(CHR(lnCnt),4 ,lcKey, lcText)
>>      SKIP
>>    ENDDO
>>  ENDFOR
>>ENDWITH
>>
>>Thanks
>
>Could it be because lckey is initialized as a number instead of a character, but when you add the 'A' it is evaluated to a character.
>
>My 2 cents

I'll take any cents I can get < G > If CustView.CustId is character(and you didn't know this) and I am using ALLTRIM() with out error, is it possible for lcKey be initialized to a number?

Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform