Hi, I am trying to open a table that has been named by the user. The name of the table is in a string called tableName.
When I run this part of my code I get an error saying that the table does not exist. But I see that the table is there, but why can't I open it. Thank you.
here is my code:
Set conDatabase = CurrentProject.Connection
strSQL2 = "SELECT * FROM tableName"
rs2.Open strSQL2, conDatabase, adOpenDynamic, adLockOptimistic
When I run this part of my code I get an error saying that the table does not exist. But I see that the table is there, but why can't I open it. Thank you.
here is my code:
Set conDatabase = CurrentProject.Connection
strSQL2 = "SELECT * FROM tableName"
rs2.Open strSQL2, conDatabase, adOpenDynamic, adLockOptimistic