Solved Me.subform.form.recordsetclone

tt1611

Registered User.
Local time
Today, 14:01
Joined
Jul 17, 2009
Messages
132
Hi All
I have a subform attached to a main form whose recordset is bound to a SQL Server stored procedure. I can get the sproc data to populate the subform just fine using
Code:
set subformname.form.recordset = sproc_rst

sproc_rst being an ADODB recordset.

However the very next line, I am trying to check if records exist in the subform and im using
Code:
[CODE]dim rsclone as recordset
set rsclone = me.subformname.form.recordsetclone
[/CODE]

The code breaks opening my ODBC datasources window prompting for an ODBC connection. I have been able to use this before so not sure whats changed in Access 2021. Any help on this would be appreciated.

Thanks
 
Hi. Not sure what happened either; but if you said it is literally the "next line", then perhaps just reuse the same variable?
Code:
Set rsclone = sproc_rst
Just a thought...
 
Hi. Not sure what happened either; but if you said it is literally the "next line", then perhaps just reuse the same variable?
Code:
Set rsclone = sproc_rst
Just a thought...
AND THAT WORKED JUST FINE.

Thanks for your help and very quick response. Very weird this worked in prior office versions. Have a great day.
 
AND THAT WORKED JUST FINE.

Thanks for your help and very quick response. Very weird this worked in prior office versions. Have a great day.
Glad to hear you got it to work. Good luck with your project.
 
I have not tested it, but I am wondering if the recordsetclone property can return an ADO recordset. The literature hints that this is for DAO recordsets.
 

Users who are viewing this thread

Back
Top Bottom