PDA

View Full Version : creat a recordset from another recordset



dhartford
10-13-2008, 09:15 AM
When I try to create a recordset rstA from another recordset rstB and received compile error:



....
dim rstA as recordset

strSQL = "Select [" & fldName & _
' "] From [" & rstB & _ 'error here, type mismatch
' "] Where [Client] = " & rstB(0) & _
' " Order by [" & fldName "] "

rstA.Open strSQL, CurrentProject.Connection
....



Does the rstB have to be a table instead of recordset?

Thanks a lot.

stanl
10-13-2008, 05:07 PM
I think you would want to use SELECT INTO... FROM

.02 Stan

CreganTur
10-14-2008, 05:40 AM
One option is that you can clone rstB and then use either Seek of Find to locate the exact record you're looking for.