T
Tim
Hi folks,
I tried to select the field value from my first recordset
but I got an error message. Could anyone help to fix it?
dim dbs as database
dim rst1 as recordset
dim rst1 as recordset
set dbs =currentdb
set rst1=dbs.openrecordset ("Select distinct [Test ID],
[Test Value] from table3;")
set rst2=dbs.openrecordset ("select " & rst1.fields
("[Test ID]").value & " as f1 From " & rst1 & " Group
by " & rst1.fields("[Test ID]").value & " Having Count("
& rst1.fields("[Test ID]").value & ") >1;")
debug.print rst2.fields("f1").value
If rst1 contains no record, what happen to rst2 and how
to handle it?
Thanks in advance.
Tim.
I tried to select the field value from my first recordset
but I got an error message. Could anyone help to fix it?
dim dbs as database
dim rst1 as recordset
dim rst1 as recordset
set dbs =currentdb
set rst1=dbs.openrecordset ("Select distinct [Test ID],
[Test Value] from table3;")
set rst2=dbs.openrecordset ("select " & rst1.fields
("[Test ID]").value & " as f1 From " & rst1 & " Group
by " & rst1.fields("[Test ID]").value & " Having Count("
& rst1.fields("[Test ID]").value & ") >1;")
debug.print rst2.fields("f1").value
If rst1 contains no record, what happen to rst2 and how
to handle it?
Thanks in advance.
Tim.