Hi
I have a main form with a subform. The subform is unlinked. When I open the main form I build an SQL statement using various params and apply it to both the main and subform.. I won't bore you to death with why but I am using pre-Acc2007 but trying to replicate a Acc2007split-form!
When a filter is applied to the subform, I reset the main form recordset as below. I've added some msgboxes in there to help diagnosis:-
Code:
Dim rst As DAO.Recordset
MsgBox Me.My_SubForm.Form.RecordsetClone.RecordCount
Set Me.Form.Recordset = My_SubForm.Form.RecordsetClone
MsgBox Me.Form.RecordsetClone.RecordCount
But the recordset is not copied correctly... the recordset count is always 6 and when cycling thru' the field names using:-
Code:
me.form.recordsetclone.Fields(nn).Name
None of the ![column_names] are in the collection with the field names being "001","002","003" etc instead Any idea why please???
Thanks
P.S.
As an experiment, I set mainform recordset=subform recordsetclone in the form_open event, the form(s) open and behave perfectly.