Quote Originally Posted by si_the_geek View Post
There are three objects on this line (88 in your last post), and it could be referring to any of them:
..however, the lines just before it assign values to GetInformationDA and GetInformationDS, and as they are not in an If block etc they must run - so it can't be either of those variables.

TableName is given a value earlier on, but only within an If block - and it is entirely possible that none of your conditions will match, so the variable will not be given a value.

To correct that, either add an Else clause with no conditions to give it a default value, or (shorter) set a default value in the declaration.


The ColumnName variable has exactly the same issue.
I was working through the code and I saw what you mean. I put the code within the IF block and I got no complaints. I am going to test to see if it works the way it's supposed to. Thanks si.