Imagine you have a simple INSERT INTO statement as follows:
strSQL2 = "INSERT INTO tblInvoiceLine (invlinedescription, invlinepriceeach) SELECT linedescription, priceeach FROM tblOrderLine WHERE ordernumber = " & Me.orderid.Value
And now instead of, say linedescription or whatever you want to insert a stockcode which appears as column in my subform.
I understand I can not use a column with an INSERT INTO statement and so I have created a text box (txtstockcode) on my form which references the column. It's control source is:
How do I reference the value in the control txtstockcode in my INSERT INTO query?
My form names are frmOrder and frmSalesOrderItems so I guess my statement will refer to something like:
SELECT '" & frmOrder.frmSalesOrderItem
But that is where I am stuck!