I'm trying to create a recordset equal to a subform's recordset using ADO. I can do it with DAO:
Dim rs As DAO.Recordset
Set rs = theSubform.Form.Recordset
but this won't work with an ADO recordset. I can open an ADO recordset using the subform recordsource in the Open method:
Dim rs As New ADODB.Recordset
rs.Open theSubform.Form.RecordSource, CurrentProject.Connection
but this is no good because the subform is linked to the master form and that field is not in the subform's recordsource so rst is not set correctly.
Is there any way to just set rs equal to the subform's recordset?
Thanks!
Dim rs As DAO.Recordset
Set rs = theSubform.Form.Recordset
but this won't work with an ADO recordset. I can open an ADO recordset using the subform recordsource in the Open method:
Dim rs As New ADODB.Recordset
rs.Open theSubform.Form.RecordSource, CurrentProject.Connection
but this is no good because the subform is linked to the master form and that field is not in the subform's recordsource so rst is not set correctly.
Is there any way to just set rs equal to the subform's recordset?
Thanks!
Last edited: