I've searched the internet far and wide and can't seem to find an answer for this.
I need to run a query 1/2 through vba code in my form(because I import a file first). I then need to add new records to a table using fields from that form I'm in and from the query. I would like to do it similar to db.openRecordset("myTable") but it doesn't want to load queries in Access 2000.
I also tried runSQL but the statement copied from the query refuses to run(its kinda long):
DoCmd.RunSQL "SELECT T_JEV_Vendors.NAME, Sum(JEVImport!F17*T_JEV_Vendors!AmtResponsible) AS PPH FROM JEVImport INNER JOIN T_JEV_Vendors ON JEVImport.F3 = T_JEV_Vendors.JEV_Question GROUP BY T_JEV_Vendors.NAME ORDER BY Sum(JEVImport!F17*T_JEV_Vendors!AmtResponsible) DESC"
Does anyone know how to open a query like a recordset in VBA or have a better way of doing this??? MUCH APPRECIATED!!!
I need to run a query 1/2 through vba code in my form(because I import a file first). I then need to add new records to a table using fields from that form I'm in and from the query. I would like to do it similar to db.openRecordset("myTable") but it doesn't want to load queries in Access 2000.
I also tried runSQL but the statement copied from the query refuses to run(its kinda long):
DoCmd.RunSQL "SELECT T_JEV_Vendors.NAME, Sum(JEVImport!F17*T_JEV_Vendors!AmtResponsible) AS PPH FROM JEVImport INNER JOIN T_JEV_Vendors ON JEVImport.F3 = T_JEV_Vendors.JEV_Question GROUP BY T_JEV_Vendors.NAME ORDER BY Sum(JEVImport!F17*T_JEV_Vendors!AmtResponsible) DESC"
Does anyone know how to open a query like a recordset in VBA or have a better way of doing this??? MUCH APPRECIATED!!!