hello all, can you help please, I have the following code to try and make a recordset,
when it gets to [Set rs1 = CurrentDb.OpenRecordset(SQL, dbOpenSnapshot)] it keeps throwing up an error "runtime error 3061 to few parameters, expected 1"
what am I doing wrong and how do I rectify this please
:banghead::banghead:
when it gets to [Set rs1 = CurrentDb.OpenRecordset(SQL, dbOpenSnapshot)] it keeps throwing up an error "runtime error 3061 to few parameters, expected 1"
what am I doing wrong and how do I rectify this please

Code:
Dim SQL As String
Dim rs1 As DAO.Recordset
Dim i As Integer
'SQL statement to retrieve data from database
SQL = "SELECT Table1.ID, Table1.id1, Table1.WeldNo, Table1.Material_Cast_Heat_No1, Table1.Item1, " _
& "Table1.Material_Cast_Heat_No2, Table1.Item2, Table1.Schd_Thickness, Table1.Process, Table1.WPS, Table1.Dia, " _
& "Table1.Material, Table1.WelderID, Table1.Weld_Date, Table1.Visual_Insp_By, Table1.Visual_Rep, Table1.DP_Result, " _
& "Table1.DP_Report, Table1.MP_Result, Table1.MP_Report, Table1.RT_Result, Table1.RT_Report, Table1.UT_Result, " _
& "Table1.UT_Report, Table1.Other_Res, Table1.PWHT, Table1.PWHT_Report_Graph, Table1.RT_Result_after_PWHT, " _
& "Table1.UT_Result_after_PWHT, Table1.row_No, Table1.Lot_Heat_BatchNo_s, main.Client, main.Project, main.Drawing, " _
& "main.[Drawing Link], main.[Report link]" _
& "FROM main LEFT JOIN Table1 ON main.ID1 = Table1.id1 " _
& "WHERE (((Table1.id1)=[Forms]![Mainform]![subform]![id1]));"
Debug.Print SQL
Set rs1 = CurrentDb.OpenRecordset(SQL, dbOpenSnapshot)
With rs1
Debug.Print .RecordCount
.Close
End With