check if text box is empty

Hi I have a text box control witht the name txtBestaandDatum

And I try to check if that text box is empty:

IF CurrForm.txtBestaandDatum := ‘’ THEN BEGIN
ERROR(‘Datum kan niet leeg zijn’);

Thank you

You cannot check the control name. You need to check the actual field/variable assigned as the source of the control. So don’t use the CurrForm.

You cannot check a control. Why don’t you use the variable or table field which is source expression to the TextBox.
Hope this helps.

Thank you