Solved

How do I suppress action query messages in an Access 2007 macro

Posted on 2009-05-13
6
1,007 Views
Last Modified: 2013-11-28
I have an Access 2007 database that uses a macro to first run a delete query to empty a table, then uses an insert query to populate the table, then runs a report off the table.  I'm not real keen on this method, but it's how the DB owners want it.  

The problem is that when they run the macro, you get 4 messages, confirm you want to run the delete, confirm you want to delete x records, confirm you want to run the insert, confirm you want to insert x records.

I would like to be able to suppress these messages.  Is there any way to do this?
0
Comment
Question by:SatTechSolutions
  • 4
  • 2
6 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24375011
Hi SatTechSolutions,

  DoCmd.SetWarnings False

& afterwards
  DoCmd.SetWarnings True


Good Luck!

Gary
0
 
LVL 1

Author Comment

by:SatTechSolutions
ID: 24375037
How do I do that in a Macro?  (I haven't worked in Access in about 10 years)
0
 
LVL 46

Assisted Solution

by:tbsgadi
tbsgadi earned 250 total points
ID: 24375046
SatTechSolutions,

SetWarnings No
Gary
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 1

Author Comment

by:SatTechSolutions
ID: 24375127
I don't have any option I can see in the Macro called SetWarnings
0
 
LVL 46

Accepted Solution

by:
tbsgadi earned 250 total points
ID: 24375181
SatTechSolutions,
Click the Show All Actions button in the Show/Hide group on the Macro Design
Tools tab.

Gary
0
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24382216
Did you manage to do this?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now