Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Setall with the Grid Control
Message
 
To
20/10/1997 10:08:41
Sonny Chouinard
CHCA Computer Systems Inc.
Lachenaie, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055367
Message ID:
00055544
Views:
29
>>The command I use in the interactive change event of a textbox is as follows:
>>
>>thisform.gridsched.SetAll("DynamicBackColor", "IIF(between(entereddate,templates.date_from,templates.date_to),;
>> RGB(64,0,128), RGB(191,255,255))", "Column")
>>
>>The entereddate,templates.date_from,templates.date_to are all date type variables and this command initially works but if you erase the entered date in the textbox as in to reenter a new date the error invalid expression pops up.
>>
>>Thanks,
>>
>>Don
>
>Hi, the only thing I see is when you erase the entereddate value, maybe the variable
>erases completly or the type of the variable has changed when the grid refresh. Maybe you should use a property
>like THISFORM.enteredDate. So the variable will be always present.
>
>Hope this help.

Don, in addition to Sonny's suggestion, check the initial value of the variable. If it's linked to a field in a table, then the data-type will always match the field. However, if the textbox value is a variable then you might want to check in the valid or lostfocus events that it is truly a date.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform