Solved Me.subform.form.recordsetclone (1 Viewer)

tt1611

Registered User.
Local time
Yesterday, 20:23
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
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:23
Joined
Oct 29, 2018
Messages
21,515
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...
 

tt1611

Registered User.
Local time
Yesterday, 20:23
Joined
Jul 17, 2009
Messages
132
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.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:23
Joined
Oct 29, 2018
Messages
21,515
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.
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 20:23
Joined
May 21, 2018
Messages
8,556
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

Top Bottom