>Hello Gentle Peoples
>
>Got an error cropping up from a form "DataSession is not valid" and it's occuring out of the following code that runs on refresh of the toolbar
I'm not quite sure that messagebox() isn't influencing what you see. It's a system dialog, it can take the focus off the app, some activate code may be running after you close the messagebox, and that code may switch the DS on you... all in all, I don't trust it as a neutral observer. You may try to replace these calls with logging into a simple text file and then see what you get. Also, you may add a call to aSessions() to create an array of available sessions - twice, once you get the current session, once in the end, and compare the arrays to see what's missing. Another thing to check is which form or session object owned the invalid DS - if it was released during the run of your code, that would explain it.