Well... you say it runs outside of the logon context. when you do run it after logon, are you running all the same scripts that would run at logon, or just this one? This does not look like your entire logon script so you may have some var scope issues if called from another script.

There are a few things that don't sit right.

$DBpath = "\\SERVERNAME\FOLDER\FOLDER\ITAssets.mdb"
is not right.

$DBpath = "\\SERVERNAME\SHARE\FOLDER\ITAssets.mdb"
is more like it.

You should not put vars in quotes!
If Exist("$DBpath") = 0

If Exist($DBpath) = 0

and don't use GOTO!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.