G
Guest
I am developing a database that takes a standard product bill of materials
and creates a base quote. The sales person can then modify the BOM to suit
the quote.
I am using an insert query to copy a particular model component records into
a quote components table and attach a quote number. My problem is getting
the quote number into the quote components record. There is a quote table
which has the quote number, and a quote components table where the model
components are copied with the quote number attached.
The SQL is
INSERT INTO tblQuoteComponents ( ComponentlNo, ComponentlDescription,
MaterialNo, ItemsQty, UnitsPerItem, SubAssemblyNo, QuoteNo )
SELECT tblComponents.ComponentlNo, tblComponents.ComponentlDescription,
tblComponents.MaterialNo, tblComponents.ItemsQty, tblComponents.UnitsPerItem,
tblComponents.SubAssemblyNo, [Forms]![frmQuoteHeader]![txtQuoteNo]
FROM tblComponents
WHERE (((tblComponents.ModelNo)=[Forms]![frmQuoteHeader]![cmbBaseModelNo]))
WITH OWNERACCESS OPTION;
The problem is that the quote components quote number is not having the
[Forms]![frmQuoteHeader]![txtQuoteNo] field inserted which causes an error.
Assistance would be appreciated.
and creates a base quote. The sales person can then modify the BOM to suit
the quote.
I am using an insert query to copy a particular model component records into
a quote components table and attach a quote number. My problem is getting
the quote number into the quote components record. There is a quote table
which has the quote number, and a quote components table where the model
components are copied with the quote number attached.
The SQL is
INSERT INTO tblQuoteComponents ( ComponentlNo, ComponentlDescription,
MaterialNo, ItemsQty, UnitsPerItem, SubAssemblyNo, QuoteNo )
SELECT tblComponents.ComponentlNo, tblComponents.ComponentlDescription,
tblComponents.MaterialNo, tblComponents.ItemsQty, tblComponents.UnitsPerItem,
tblComponents.SubAssemblyNo, [Forms]![frmQuoteHeader]![txtQuoteNo]
FROM tblComponents
WHERE (((tblComponents.ModelNo)=[Forms]![frmQuoteHeader]![cmbBaseModelNo]))
WITH OWNERACCESS OPTION;
The problem is that the quote components quote number is not having the
[Forms]![frmQuoteHeader]![txtQuoteNo] field inserted which causes an error.
Assistance would be appreciated.