A family of Microsoft relational database management systems designed for ease of use.
I am trying to import the above excel file using "append" to my invoice_details table where Invoice is looked up from Invoices, an order is looked up from the orders table, and a unit is looked up from the units table. The order already exists in the orders table, the invoice already exists in the invoices and the unit already exists in the units table.
What you need to do is create an append query in which the imported 'master' table is joined to the Invoices, Orders, and Units tables on the non-key columns. You can then append primary key columns of Invoices, Orders, and Units to the foreign key columns in Invoices_Details. The following query from my demo is analogous to this. It inserts data into two rather than three foreign key columns, but the principle is the same:
INSERT INTO ContactEmployers (ContactID, EmployerID)
SELECT Contacts.ContactID, Employers.EmployerID
FROM (Contacts INNER JOIN MasterTable
ON (Contacts.Address=MasterTable.Address)
AND (Contacts.LastName=MasterTable.LastName)
AND (Contacts.FirstName=MasterTable.FirstName))
INNER JOIN Employers ON MasterTable.Employer=Employers.Employer;