I'll bet that it is a problem with your global variable dexResults. Global variable names are case sensitive. I am guessing that your global variable dexResults is not initialized. Either there is no dexResults global variable defined, it does not have a value or it is defined but as DexResults (maybe you have two variables defined).
To debug you can do one of two things, when running it manually you can use MsgBox DTSGlobalVariables("dexResults").Value
Or you can use DTSPackageLog.WriteStringToLog "dexResults is :" & DTSGlobalVariables("dexResults").Value
For more information on using WriteStringToLog see
http://www.mutuallybeneficial.com/in...s_portable.htm
For some examples on using Write string look at DTS ActiveX Logging Script.txt on that page.
David Lundell
Principal Consultant and Trainer
www.mutuallybeneficial.com