Hi
I've a form set up where I dynamically build SQL strings and apply them as recordsources to various forms.
I switch form Rs's to a 'temporary' recordset when a record is being edited.... this way, if the user clicks my custom cancel button, I can simply re-set the recordsource to the original and throw away the uncommited details in the temp recordset. I've had this working for ages.
I've just hit a new problem tho' when returning from the temp to the 'permanent' recordset. Having reset the recordsource, all subsequent references to "me.form.recordset" (clone,recordcount etc) fail with
I know there is a recordset in there because if I do a
I get a valid record number???
Any ideas why it thinks the object s closed please?
Thnks
I've a form set up where I dynamically build SQL strings and apply them as recordsources to various forms.
I switch form Rs's to a 'temporary' recordset when a record is being edited.... this way, if the user clicks my custom cancel button, I can simply re-set the recordsource to the original and throw away the uncommited details in the temp recordset. I've had this working for ages.
I've just hit a new problem tho' when returning from the temp to the 'permanent' recordset. Having reset the recordsource, all subsequent references to "me.form.recordset" (clone,recordcount etc) fail with
I reset the Rs like this:-Error 3420 Object Invalid or No Longer Set
Code:
Rec_Src_String = "SELECT * FROM Addresses etc etc"
Me.Form.RecordSource = Rec_Src_String
msgbox me.form.recordset.recordcount <---- fails
Code:
msgbox Me!Unique_No
Any ideas why it thinks the object s closed please?
Thnks