Hi Frank, JB, CDB,
If you erase the text of a combobox entry, you aren't deleting it, you're just amending it. However, if you want to prevent blanks from appearing in your combobox dropdown list, you can always add a filter to your combobox (see screenshot1 in the attachment).
The 'foreign key constraint' error message is because you are trying to delete an equipment type that is being referenced by data in another table. You can always add a query somewhere in your program to show you which equipment types are not being used at and can therefore safely be deleted (see the 'equipment type usage' option in the attachment as a suggestion).
As a general question, is there a reason why you can't just call a form with an editable grid when you want your user to be able to maintain the list of equipment types (again, see the attachment - cliick on the 'Equipment Type' label in Form2) or is that an over-simplification)?. It has the advantage of being applicable irrespective of whether you have your combobox configured to be 'searchable' and/or 'first item empty', and MVD takes care of updating the combobox dropdown list when you return to the calling form.
Regards,
Derek.
Post's attachments equipment01.zip 481.82 kb, 235 downloads since 2020-10-10