I tried what you said to no avail. I built a query that output field [Raw Material] in qry_CurrentFormula_Pt3. However the sSQL I have written keeps giving Error: Too few parameters, expected 3. Could someone please tell me what's wrong with my sSQL?
Code:
sSQL = "INSERT INTO tmp_Formula (BP, Item, BillType, RawMaterial, UoM) " _
& "SELECT [Forms]![frm_Formulation]![BP] AS BP, [Forms]![frm_Formulation]![ITEM] AS Item, " _
& "[Forms]![frm_Formulation]![BILL TYPE] AS BillType, tbl_RawMaterial.RawMaterial, '' AS UoM " _
& "FROM tbl_RawMaterial, qry_CurrentFormula_Pt3 " _
& "WHERE (((tbl_RawMaterial.RawMaterial) Like [Raw Material] & 'S*'))"
CurrentDb.Execute sSQL, dbFailOnError
CurrentDb.TableDefs.Refresh
Me.Refresh
What I am aiming to do is select only the raw material that is like the raw material that I'm typing in the field currently. So If I type in 174476 in field 1 only 174476S1 and any other sub ingredient for that raw material should be inserted.