If ADOQuery1.Locate(...) Then label1.Caption := ADOQuery1.FieldByName(...).AsString Else label1.Caption := '0';