A
Alex Dybenko
Hi David,
can't agree here. I have discovered this in real-world application, imagine
code like:
For i = 0 to 1000
Call MySub()
Next i
Sub MySub
Set db = CurrentDB()
[do the rest]
end sub
or you have a recursion function, which calls itselt, where you also do Set
db = CurrentDB(), you can easy reach the limit
--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
Again, there is never any reason to us CurrentDB() in a loop, as the
database it refers to can never be different from one iteration of
the loop to the next. Thus, there is no cumulative performance
penalty in using CurrentDB() over DBEngine(0)(0) that makes a
difference in real-world application programming. It only makes a
difference if you set up an artificial structure that should never
happen in a well-designed application.
can't agree here. I have discovered this in real-world application, imagine
code like:
For i = 0 to 1000
Call MySub()
Next i
Sub MySub
Set db = CurrentDB()
[do the rest]
end sub
or you have a recursion function, which calls itselt, where you also do Set
db = CurrentDB(), you can easy reach the limit
--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com