if not srcHams.DataSet.FieldByName('fldMail').IsNull then
Settings.RegMail := srcHams.DataSet.FieldByName('fldMail').Value
else
Settings.RegMail := '';
to check if a field has a value - this was a quick and dirty way of getting on with the job at the time. But there must be an easier way that I just haven't found in the manual