How to hide the message box when making a table?

  • Thread starter Thread starter jesZee
  • Start date Start date
J

jesZee

Hi Access-guru,

I have a macro that make & append data to a table. However, each time I
ran it, there will be messages popping up telling me that the old table
will be deleted and I will append # of data into my new table. I want
to suppress that comment but can't seem to make it work.

I have tried putting in "Echo" before the "Make table" in the Action
field and after the Make table - but nothing works.

Please assist.

THANK YOU VERY MUCH.

J.
 
Instead of Echo use SetWarnings Off.

Before the maco ends SetWarnings back to On or you will eventually regret it.
 
Hi Access-guru,

I have a macro that make & append data to a table. However, each time I
ran it, there will be messages popping up telling me that the old table
will be deleted and I will append # of data into my new table. I want
to suppress that comment but can't seem to make it work.

I have tried putting in "Echo" before the "Make table" in the Action
field and after the Make table - but nothing works.

Please assist.

THANK YOU VERY MUCH.

J.

Try setting SetWarnings to No.

Remember to turn it back to Yes when you're done - it persists for the
duration of your Access session otherwise.
 
Hi Access-guru,

I have a macro that make & append data to a table. However, each time I
ran it, there will be messages popping up telling me that the old table
will be deleted and I will append # of data into my new table. I want
to suppress that comment but can't seem to make it work.

I have tried putting in "Echo" before the "Make table" in the Action
field and after the Make table - but nothing works.

Please assist.

THANK YOU VERY MUCH.

J.

Right before you run the query, set SetWarnings to False; be sure to
set SetWarnings to True on the line after, or you'll turn off ALL
warning messages.

Or, run the query in VBA code using the Querydef Execute method
instead of using macros. This will let you trap actual query errors
(which the macro cannot do).

John W. Vinson[MVP]
 
Back
Top