Hi
@dalski - I question what you are attempting or expecting to happen here:
The "Client Company" combo's purpose is to select a company from the list of all Companies (based on a Companies table query), so that the list of contacts is restricted to those associated to the Company. Do you use/maintain a table of Company - Contacts as the source?
Two text boxes showing who is the
current Client Company and Client Contact should be displayed in the form.
The combos are used to update these text boxes.
You then indicate you delete the Client Company in the combo - this (I expect) does not delete the Client Company ID in the Proposal table as the source for the combo is the Companies table (I think). Anyway - why would you want that - there may be other current proposals that are active involving that Company (and Contact).
Note also that deleting the CompanyId in the proposals table has no impact upon the ClientContactID recorded. These two pieces are independent of each other (as far as the db is concerned). If you had a table where CompanyContacts was held and a FK to the CompanyContact then you would not hold both items in Proposals - but that is a further restructure of your data (normalisation).
If you wish to change the proposal so that the ClientCompany or ClientContact is changed then use the combos.
If the proposal is to be deleted - then delete the Proposal record.
If the Proposal record requires the removal of the ClientCompany and ClientContactID and will be saved in that state then consider:
- Does your Proposal table have ClientCompanyID and ClientContactID as
required items? If so then the record cannot be saved in that state.
- If those constraints do not exist in your proposal table, then you can delete the ClientContactID or ClientCompanyID as needed using the textbox controls displaying these items in the form (if you add / show them on the form as suggested above).