This code works, where the field value is hard coded into the locate statement:
if not (dbData.Locate('NAME', DBLookupComboBox.Text,[loCaseInsensitive])) then
MessageDlg('No matching record found.', mtInformation, [mbOK],0);
This code does not does work, where I am setting the field value in a combobox:
if not (dbData.Locate(DataFieldComboBox.Text, DBLookupComboBox.Text,[loCaseInsensitive])) then
MessageDlg('No matching record found.', mtInformation, [mbOK],0);