UPDATE TABLE ACTION BOX

  • Thread starter Thread starter jack gunawan via AccessMonster.com
  • Start date Start date
J

jack gunawan via AccessMonster.com

HI, HOW CAN I REMOVE THE ACTION BOX "THE EXISTING TABLE WILL BE DELETED
BEFORE YOU RUN THE QUERY, DO YOU WANT TO CONTINUE?" WHENEVER I RUN MAKE
TABLE QUERY. SO AS NOT TO MANUALLY CLICK YES EVERY TIME I RUN THE MAKE
TABLE QUERY. THANKS.


JACK
 
Please don't shout,

goto tools, options, edit/find

confirm,

un-tick action queries.
un-tick document deletions.

one of those will do the trick..
 
What Alex means about not shouting is don't use all caps, it is impolite.

I would be concerned about using Alex's technique, as that would prevent the
warning boxes from coming up when running any query. If you are running
this query from code, there are several ways you can do this.

1. use the currentdb.execute command. This prevents the warning from
displaying

db.execute "Insert your QueryName here"

2. If you are using the docmd.runsql command, you can preceed it with a
docmd.setwarning False statement.

docmd.SetWarnings False
db.execute "Insert your QueryName here"
docmd.setWarnings True

HTH
Dale
 
I, too, would recommend the Execute method. Note that when you use that
method, you have the ability to specify a number of options. The one I find
very useful is dbFailOnError. It rolls back the attempted update, and raises
an error that can be trapped to help you debug what's going wrong.

db.execute "Insert your QueryName here", dbFailOnError
 
jack said:
HI, HOW CAN I REMOVE THE ACTION BOX "THE EXISTING TABLE WILL BE DELETED
BEFORE YOU RUN THE QUERY, DO YOU WANT TO CONTINUE?" WHENEVER I RUN MAKE
TABLE QUERY. SO AS NOT TO MANUALLY CLICK YES EVERY TIME I RUN THE MAKE
TABLE QUERY. THANKS.


Fix your Caps Lockkey, it's stuck.

A different approach that avoids the table deletion and
(re)creation would be to execute a Delete query to remove
the records from the table and then use an Append query
(instead of a Make Table query) to add the new records.

Set db = CurrentDb()
db.Execute "DELETE * FROM thetable"
db.Execute "INSERT INTO thetable SELECT . . . "
 
Back
Top