Hi All,

I open 5 tables like so

VB Code:
  1. CurrentDatabaseName = "Qwest"
  2.        
  3.         rstQwest.Open "Qwest_Details", connQwest, adOpenKeyset
  4.        
  5.         rstQwest2.Open "Qwestname", connQwest, adOpenKeyset
  6.        
  7.        
  8.         CurrentDatabaseName = "Weldspec"
  9.        
  10.         rstWeldspec.Open "Weldspec_Details1", connWeldspec, adOpenKeyset, adLockOptimistic
  11.        
  12.         rstWeldspec2.Open "Tester_Weldspec", connWeldspec, adOpenKeyset, adLockOptimistic
  13.        
  14.         rstWeldspec3.Open "newtable", connWeldspec, adOpenKeyset, adLockOptimistic

and it fails on this line as I have spelt it wrong.

VB Code:
  1. rstWeldspec.Open "Weldspec_Details1", connWeldspec, adOpenKeyset, adLockOptimistic

What I want to be able to do is to print out the table name that has failed. I could have string and set it to the table name before I open each table. But thought there might be a better way of doing this as it is later on that I want show the result.

Thanks

Loftty