2 Replies Latest reply on Mar 12, 2009 1:00 AM by ianmanning

    Adding  a new customer record to a related table only if the customer does not already have a record

    ianmanning

      Title

      Adding  a new customer record to a related table only if the customer does not already have a record

      Post

      I am writing a Quotation database. which uses multiple tables one for the actual quotation another for customer details (address etc)

      I have a key feild on the customer table which is a serial number. I want to link the quotation to the customer usiong this key.

      In the quotation table I need to be able to automatically select this key by typing (or selecting) the customers name into a field. If the name does not exist I need to add it to the customer table but if it is already there I need the details to populate the fields in the layaout. I have tried adding a contact field in the quotation table as a drop down list from the Customer table but this allways adds a new record to the customer table if I remove the add records in the releationship I do not get any customers being shown in the dropdown list as there is not any current key .

      I guess there is an obvious solution to my rambling If someone has an example of adding the key by selecting from a list or dropdown I would be very grateful.

      Best regards

      Ian