Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2007

Tip: Looking for answers? Try searching our database.

Existing table "Name of table" will be deleted before  you run the

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
learner - 04 Mar 2007 01:58 GMT
Hello
Is there any way to disable the message below when running a make table
query or replacing a table.
Existing table "Name of table" will be deleted before  you run the query"

Do you want to continue "YES" "NO"

Its an extra click  for the user
Thanks
Allen Browne - 04 Mar 2007 02:10 GMT
Rather than toy with SetWarnings or confirmation options, the best solution
is to use a Delete query followed by an Append query instead of a Make Table
query.

By designing the table ahead of time (rather than using a Make Table query),
you can define the data types you want: which fields are integers, longs,
double, which are text, which are date, and so on. You can also set the
properties (e.g. set Allow Zero Length to No, which is set inconsistently
(depending on your version) by a Make Table query.)

The code to populate the table then looks like this:
   Dim db As DAO.Database
   Dim strSql AS String
   strSql = "DELETE FROM Table1;"
   db.Execute strSql, dbFailOnError
   strSql = "INSERT INTO Table1 ( ...
   db.Execute strSql, dbFailOnError
   Set db = Nothing

For further info about the code, see:
   Action queries: suppressing dialogs, while knowing results
at:
   http://allenbrowne.com/ser-60.html

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hello
> Is there any way to disable the message below when running a make table
[quoted text clipped - 5 lines]
> Its an extra click  for the user
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.