I posted a msg earlier about a strange problem I had where I would get an error 500 &#039;object variable not set&#039; when trying to access the contents of a session which had not been created eg:<BR><BR>if session("userid") = ""<BR>.... would cause an error...<BR><BR>The cause of this very confusing error was an innocent bit of code which worked, but was causing the above strange side effect...<BR><BR>What I had done was add the following code to a login script to clear all session variables value&#039;s. (I cant remember the reason why I was doing it!)<BR>------------------<BR>for each item in session.contents<BR> set session(item) = nothing<BR>next<BR>------------------<BR><BR>After that bit of code, it was game over when trying to access sessions that didnt exist unless i used on error resume next...<BR><BR>Anywayz, does anyone know why that code would cause the problems I had?<BR>In hindsight, maybe if I tried <BR>---<BR>if session("userid") = nothing<BR>---<BR>it would have worked? I&#039;ll try it out and let everyone know. Good to know that the above code can cause nonsense!