Hi guys,
I needed to srart tinkerring in Access/VBA/SQL trying to get some things done. I am reasonably sure I am doing things right, but access keeps on telling me, I am not giving it an argument it wants....any help?
Thank you.
Code:Dim newtest As String Dim newrs As DAO.Recordset Dim newfilter As String Dim rs2 As DAO.Recordset Dim asd As String newtest = "SELECT test.Helper_ID FROM test GROUP BY Test.Helper_ID" Set newrs = CurrentDb.OpenRecordset(newtest) Do Until newrs.EOF Debug.Print newrs![Helper_ID] asd = newrs![Helper_ID] newfilter = "SELECT Test.* FROM test WHERE helper_ID = asd" 'this is where I fail.... Set rs2 = CurrentDb.OpenRecordset(newfilter) newrs.MoveNext Loop