Hi
I need to create a table that is empty, but has the data structure (i.e. the same columns) of another table. Both tables should be in the same DB.
I need this as part of my VBA code.
I searched the web and found this:
It's not working.. The query itself doesn't even work in the query browser. Of course it doesn't work in VBA either. I get a message: "syntax error in create table statement".
What am I doing wrong?
Or else - is there a different solution direction to this?
Note that I need a solution in VBA for ms access, not for the query browser.
Many thanks
Rachel
I need to create a table that is empty, but has the data structure (i.e. the same columns) of another table. Both tables should be in the same DB.
I need this as part of my VBA code.
I searched the web and found this:
Code:
DoCmd.RunSQL ("CREATE TABLE test_table AS SELECT * FROM test_table WHERE 1=2")
What am I doing wrong?
Or else - is there a different solution direction to this?
Note that I need a solution in VBA for ms access, not for the query browser.
Many thanks
Rachel
Comment