Error 3252

CedarTree

Registered User.
Local time
Today, 12:37
Joined
Mar 2, 2018
Messages
449
Can't open a form whose underlying query contains a user-defined function that attempts to set or get the form's recordsetclone property.

Just started seeing this error all of a sudden on Access front-end that accesses Access back-end DB and SQL server.

Any suggestions?
 
The function is attempting to find something that doesn't exist yet, or at least hasn't been released for use. In theory, the recordset is defined, but until the Current event, there is no particular guarantee that a record actually exists. I doubt your function cares that the recordset is defined. It probably wants to use it for some purpose that requires it to be ready to expose content, like perhaps using the clone so that you can navigate to a specific record.

You say that you have both an Access BE and an SQL server BE. So... which of those two sources does the form use? The timing for the two cases would differ somewhat in availability. You COULD just use code in the form's _Current event to use the RecordSetClone to navigate for you, but doing from a UDF in a query is, I think, LITERALLY putting the cart before the horse.
 
Do you need the clone method?
ive been writing access code for 20 years and NEVER needed to clone a record set.
 
maybe another fault from MS?
 
Do you need the clone method?
ive been writing access code for 20 years and NEVER needed to clone a record set.

@Ranman256 - bound forms AUTOMATICALLY have a .RecordsetClone which you can use, e.g. for navigation. You don't have to make one. It is just there, ready to use - once the form's first _Current event has fired. Before that, the recordset and its clone might not be "ready for prime time." See, for example, the code generated if you use a Combo Box wizard to navigate you to a record selected by the combo. It doesn't create a clone. It uses the already extant .RecordSetClone.
 

Users who are viewing this thread

Back
Top Bottom