Hi Hilmar,
Thanks for the quick reply. The .Value is {} and I even set the .Value = DATE() in the Form.Init.
However, you're second suggestion was the issue. I changed SET FILTER TO Date = This.Value to SET FILTER TO Date = ThisForm.txtDateFilter.Value and now it works fine.
Tx.
>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?
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.