I have a sub that connects to SQL, creates a couple of temp tables, and opens a recordset from one of the temp tables. After opening the recordset, it creates another temp table called #Temp5 and attempts to insert records. However, I'm getting an error message that the object name #Temp5 is not valid. It's strange because I don't get any error when creating it, but it's like creating the table never even happened. When I comment out the opening of the recordset earlier in the sub, the values are inserted into #Temp5 without a problem
Does anyone know the logic behind this?
Bookmarks