Make table warning

C

Crazyhorse

under the Tools>Options>Edit/Find. I have all under Confirm unchecked. and I
also have the Warnings in the VBA Editor to false. Docmd.setwarnings(false).
but when i run my code and I have some make table queries the warnings still
pop up. I have access 2003.

Thanks
 
J

Jerry Whittle

It should be like so without ( ) :

DoCmd.SetWarnings False

Also it should be above the line for the make table.
 
J

John W. Vinson

under the Tools>Options>Edit/Find. I have all under Confirm unchecked. and I
also have the Warnings in the VBA Editor to false. Docmd.setwarnings(false).
but when i run my code and I have some make table queries the warnings still
pop up. I have access 2003.

Thanks

If the warning is that the tablename already exists, the settings won't turn
that off. *IF* you want to routinely run the same maketable query repeatedly
(you probably don't!), you should explicitly delete the table before creating
it again.

In practice, maketable queries are VERY rarely either necessary or
appropriate. If you want to create a Report, or display data on a Form, or
export data to a spreadsheet or other external location, you can do so from a
Select Query without the expensive additional step of creating a new table. If
you do for some reason need a separate table containing selected but variable
data, you should consider creating a permanent table, running a Delete query
to empty it, and then running an Append query to fill it (rather than creating
a new table each time).
 
J

John W. Vinson

It should be like so without ( ) :

DoCmd.SetWarnings False

Also it should be above the line for the make table.

Just so you put another line

DoCmd.SetWarnings True

AFTER the query execution - otherwise all warning messages from now on out
will be suppressed, even those you want to see!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top