I don't understand or see why your example code is breaking in 2007...
Does your code correctly compile in 2007?
Remember, if some error occurs, and then all your variables do loose their
value unless you have error code handling.
Also, go tools->references and REMOVE the ADO reference
(Microsoft ActiveX data object 2.5) (or something similar....
the above assumes that you not using ado...
When you do the above, you should then do a compact and repair..and exit
your application..and then re-enter....
You can also "force" the data type parameter in:
Public Sub RecalcLine (rstParent as Dao.ReocrdSet, rstChild as
Dao.RecordSet....
So, "force" the reocrdset type if you having problems with the
me.Parent.ReocrdSetClone
The above works just fine for me..but, it DOES fail if you have a ADO
reference in the tools->references in the code window..
So, nothing has changed in terms of VBA..and I converted access 97, and
access 2003 applications with 30,000+ lines of code into 2007 and it works
fine....
So, it not the coding that needs to be changed here...it is your
references.
You can also try moving up the Microsoft Office 12 Access Database engine
object up to the top as high as possible (in the #3 position).
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)