Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying conditional results in a list box
Message
From
24/04/1997 09:00:12
 
 
To
24/04/1997 06:49:02
John Thomason
King Richard Veterinary Centre
Leicester, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00029071
Message ID:
00029525
Views:
29
>>>>You can use expression for Grid.Column.ControlSource.
>>>
>>>If I understand you correctly you mean that I can use "this.controlsource" to reference the data in the quantity field of the cursor I am viewing using the grid. I used a simplified expression to test it - "IIF(MOD((this.controlsource), CEILING(this.controlsource)) <>0, this.controlsource, INT(this.controlsource)) " in the format for column2 of the grid and got the error message - function argument value, type or count is invalid.
>>
>>Here, you are wrong. You have to type expression into Column.ControlSource property sheet cell (or set it programmatically) like Grid.Column1.Controlsource=IIF(MOD(CEILING(fieldname1)....
>
>Thanks for your help again, I appreciate your patience but I think we are talking at cross purposes.
>The crux of the problem is not being able to reference the field I wish to format. As the grid is populated by data put into a cursor with a SQL statement, the field cannot be accessed by the field picker in the expression builder - only the tables in the data environment for that form are displayed. In other words, what do I replace “fieldname1” from your example with?

Yes you can pick DE table.field only, but you can type whatever you want, so use e.g. Mycursor.field1, or even better use it in code.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform