I want to create a Form automatically with VBA. I have
succeeded to create a new Form and create controls. But
if I want to fill in the Recordset property (Set
NewForm.Recordset = rstRecordSet), I get the error
message that an object is not open or does not exist.
When i open the form first (with DoCmd OpenForm), I still
get the same error. The recordset rstRecordset is open.
Ok. I don't have A2002 here to check, so this is a guess. I'm guessing that
you can not assign a persistent recordset to a form. The recordset is
generated at runtime, based on the form's rowsource & other attributes. So
although you >can< assign a rowsource at design time, I suspect you >can't<
assign the recordset at design time.