If the text of an edit is Null
show message so that the required data is filled otherwise run the code.
That's what I need.
If the text of an edit is Null
show message so that the required data is filled otherwise run the code.
That's what I need.
You have to verify that the text of your edit is not empty to execute the code. Otherwise, display a message for the user to fill in the data:
if Trim(edt1.Text) <> '' then
// tu codigo
else
showmessage('Por favor introduzca un valor');
If it is a TEdit, Javier's answer is correct, but if you talk null you must be referring to a DBedit linked to data from a TDataSet.
if not VarIsNull(DataSet[FieldName]) then
// tu codigo
else
showmessage('Por favor introduzca un valor');