I have the following piece of code
Please Login or Register  to view this content.
When I run it I get the following error message :-
Object variable or with block variable not set.
If I then manually refresh the query it works.
If I delete the query and re-build it in MSQuery I can then run the code the first time but on subsequent tries I get the error message again.
Please, can someone explain what is going on and help me overcome the problem.
John