Cowboy_BeBa
Registered User.
- Local time
- Today, 22:13
- Joined
- Nov 30, 2010
- Messages
- 188
Hi
Ive got a form, user inputs a whole bunch of data and the data is stored into 2 different tables (using a form and subform), however i also need to copy a few fields from the subform into another table (as a new record)
the table i intend to insert this data into (tblAdjustments) has four fields (that im interested in)
Type, Reason, Quantity and Product (not the exact names)
Type and reason are both just straight strings and will be the same each time, regardless of what the other two variables are, so i need type to equal "Finished Goods" and Reason to equal Produced
further to that, the subfrom has 2 fields, batchPackedQTY (which will be quantity in the new table) and fgID (product in the new table
so i need an insert into statement that does this, ive tried
INSERT INTO tblAdjustment (adjType, adjReason, fgID, adjQTY)
("Finished Goods", "Produced", Forms!SubFormBatches.fgID, Forms!SubformBatches.batchPackedQTY)
however this did not work, anyone see what im doing wrong?
Ive got a form, user inputs a whole bunch of data and the data is stored into 2 different tables (using a form and subform), however i also need to copy a few fields from the subform into another table (as a new record)
the table i intend to insert this data into (tblAdjustments) has four fields (that im interested in)
Type, Reason, Quantity and Product (not the exact names)
Type and reason are both just straight strings and will be the same each time, regardless of what the other two variables are, so i need type to equal "Finished Goods" and Reason to equal Produced
further to that, the subfrom has 2 fields, batchPackedQTY (which will be quantity in the new table) and fgID (product in the new table
so i need an insert into statement that does this, ive tried
INSERT INTO tblAdjustment (adjType, adjReason, fgID, adjQTY)
("Finished Goods", "Produced", Forms!SubFormBatches.fgID, Forms!SubformBatches.batchPackedQTY)
however this did not work, anyone see what im doing wrong?