With all the sophisticated stuff on this site, I'm embarrased to post this. Here's the code in its simple form:
Dim Con As New ADODB.Connection
Con.Open CurrentProject.Connection
Con.Execute "CREATE TABLE MyTable (MyColumn text(10));"
Con.Close
Set Con = Nothing
DoCmd.OpenTable "MyTable"
Resulting error message: "Microsoft Access cannot find the object "MyTable".
I did check for an answer (the Web, books, and help file). Everyone will tell you how to create a table but no mention of how to update the collection within the current subroutine. Refreshing the catalog didn't do it.
Can you help?
Dim Con As New ADODB.Connection
Con.Open CurrentProject.Connection
Con.Execute "CREATE TABLE MyTable (MyColumn text(10));"
Con.Close
Set Con = Nothing
DoCmd.OpenTable "MyTable"
Resulting error message: "Microsoft Access cannot find the object "MyTable".
I did check for an answer (the Web, books, and help file). Everyone will tell you how to create a table but no mention of how to update the collection within the current subroutine. Refreshing the catalog didn't do it.
Can you help?