error when running Select..Into within code module

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

My code builts a query on-the-fly which does a "select...into SomeTable".
Access gave me an error that said, "Table SomeTable already exits." and stops.

But when I tried to paste the same sql statement into a query windows, it
runs and it does not give me any messages. What do I need to do to get the
message off when my code is running? Thanks.


Ben

--
 
Try and set the warnings false

DoCmd.SetWarnings False
DoCmd.RunSQL "SELECT TableName.* INTO NewTableName FROM TableName"
DoCmd.SetWarnings True
 
Back
Top