This line of code:
rs.Open SQLStr, conn, adOpenStatic
is proving somewhat volatile - sometimes it runs with no problem, and sometimes it throws the error:
Variable not defined.
It appears to be the adOpenStatic causing problems. I'm trying to avoid referencing the ADODB library as it would then require all of my users to reference this library. If it didn't work full stop then fine but my frustration stems from the fact that sometimes it works and sometimes it doesn't.
Just wondered if anyone had come across this before and had a solution?
CreateObjectis going to throw anyway.