I have customers table (tbl_Debtors) and I also have "invoices not paid" table (tbl_Invoices_not_Paid). The secondary key on the tbl_Invoices_not_Paid is the customer_ID in the tbl_Debtors table, and as such is set to maintain referential integrity. The data for the tbl_Invoices_not_Paid is obtained from an excel spreadsheet, which is an output from SAP.
When i import the data by use of a datasheet using the simple copy and paste method of selecting all the lines from the excel spreadsheet and pasting into a datasheet form, sometimes there maybe a new customer on the excel spreadsheet that has not been updated to my MS access database.
When i paste the records from the spread sheet into the ms access datasheet, all goes well until a customer that does not exist. I get the not in list error, and the copy and paste action stops.
I would like to be able to code my form to automatically create a new record in the customers table and then finish the paste of records to the invoices not paid table, (including any lines on the excel spreadsheet for the missing customer).