assigning a recordset to a form

S

Sean Hennessey

Hello all,

Got a question for the experts. Access 2003. MDB file.
Backend is a sql server. I've got a stored procedure on
the sql server that returns a recordset I'm interested in.
I want to associate this recordset w/ a form.

dim testrec as adodb.recordset
Set testrec = get_mismatched(cirid1, cirid2)
DoCmd.OpenForm "mismatched-pairs-form", acFormDS
Set Forms("mismatched-pairs-form").Recordset = testrec

get_mismatched returns an ado recordset.

The set forms() line dies w/ an error saying: "The object
you entered is not a valid Recordset property."

The sample code I looked at from MS shows them setting the
cursortype to useclient, but the docs for the recordset
property doesn't mention this requirement.

Can anyone tell me what's wrong or let me know
the "correct" way to show the result set from calling a
stored procedure in a mdb file.

Thanks
Sean
 
Top