I have inherited an access application front and backend and am converting it to sql server backend.
The code that opens a form is: [MainSub].SourceObject = "TurtleMain". This form in turn has several subforms. I have code like this to get records for each of the subforms:
Set rsFeeding = New ADODB.Recordset
With rsFeeding
Set .ActiveConnection = con
.Source = "spSubFeeding " & vTurtleID & " "
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.Open
End With
I want to be able to set the Recordset for the subform, but the code: Set Forms!Main!MainSub.Form!TurtleFeedingSub.Recordset = rsFeeding gives me an error of "object doesn't support this property or method."
What is the correct way to set the Recordset property?
Our community of experts have been thoroughly vetted for their expertise and industry experience.