Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo RowSource not accepting Integers in EXE
Message
 
 
À
02/11/1998 23:09:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00153290
Message ID:
00153989
Vues:
27
Kenneth,

First off you can't go ignoring syntax errors, just because chosing Ignore allows the code to keep running, it hardly means that it's all of the sudden working or fixed itself. Which specific line gives you the error?

The RowSource can be changed anytime you like. After you do it you must thell the cbo to execute it's Requery() method so it'll reread the RowSource for new values.

>I've been experimenting with it.
>
>Properties at design time :-
>BoundTo=.F. (default)
>BoundColumn=3 (the Integer field)
>ControlSource=None
>Style=DropDownList
>
>The cbo is not bound, & RowSource=None (default) when Form loads. cbo.Init happens 1st, then Form.Init
>Form.Init sets the RowSource (code below), here VFP gives Program Error - Syntax Error. Ignoring, proceeds ok, but the cbo is empty
>
> lcProduct = ALLTRIM(lcProduct)
> THISFORM.cboProductList.RowSource = lcProduct+'.Name,Contents,Product_ID'
> THISFORM.cboProductList.VALUE = ALLTRIM(STR(&lcProduct..Product_ID))
> THISFORM.cboProductList.REFRESH
>
>If I move the code to cbo.Init, it's works (using another table), except I don't get the supposed alias, which is dynamically determined by the LPARAMETERS in Init. Does this mean RowSource can't be changed during RunTime? Why the difference with Run Form and EXE?
>Tried setting it in cbo.Init, then setting it again in Form.Init - the error is produced in the latter. Integer-bound cbo's RowSource can't be set in Form.Init!
>
>>Does it help to set the .Value to 0 on the property sheet?
>Nop, Value=0 at design time won't work.
>
>Also, the fault seem to lie with the Integer, removing the column rids the problem too.
>
>Guess this is one of those VFP bugs
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform