Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying conditional results in a list box
Message
De
25/04/1997 09:04:07
 
 
À
25/04/1997 06:17:43
John Thomason
King Richard Veterinary Centre
Leicester, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00029071
Message ID:
00029663
Vues:
36
>>>>>>You can use expression for Grid.Column.ControlSource.
>
>You have to type expression into Column.ControlSource property sheet cell (or set it programmatically) like Grid.Column1.Controlsource=IIF(MOD(CEILING(fieldname1)....
>
>Its me again! Entering the IIF statement in the Grid.Column.Controlsource property sheet cell had no effect, that is the quantity field was displayed in the table format i.e. 5.00. When I set the property programmatically immediately after running the SQL to define the recordsource of the grid I get a blank field displayed. I tried this with INT(fieldname1) to keep it simple and avoid syntax errors. The simplest solution of all I presume is to include an expression in the SQL select to format the display- this worked fine with the simple INT(fieldname1) When I substituted the IIF statement the code saved without producing an error message but the cursor wasn’t produced. Using IIF(MOD((fieldname1), CEILING(fieldname1)) <>0, fieldname1, INT(fieldname1)) if I included the expression in the field list exactly as above it produced a compiling error, if I surrounded it in quotes it compiled fine but didn’t run as mentioned above. If I used INT(fieldname1) in quotes it worked fine. Is there a
>syntax error here or doesn’t SQL select like IIF expressions.
>Thanks again.

SQL-Select accepts all VFP functions.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform