Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd SET FILTER problem
Message
From
26/02/2004 15:05:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00881219
Message ID:
00881221
Views:
33
The type mismatch probably means that the date field is of type date, and the TextBox, of type character. Make sure it is of type date, or do a conversion. To make the TextBox of type date, you can assign it an initial value of {}.

Also, "This.Value" will very likely be meaningless a little later in the program. Therefore, you may have to use a variable instead.

HTH,

Hilmar.

>I have a form with a grid and a textbox. On the forms .Init the textbox .Value=DATE() and the table is filtered with, SET FILTER TO Date = DATE().
>
>In the .Valid of the textbox I have the following:
>
>SELECT Cmessage
>SET FILTER TO Date = This.Value
>
>ThisForm.GrdMain.Refresh
>
>When I type a valid date in the textbox like 2001.06.27 I get an Operator/Operand type mismatch error on the ThisForm.GrdMain.Refresh line.
>
>There is no code in the grids .Refresh event.
>
>Any thoughts?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform