Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 19th, 2008, 12:54 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Default Prevent the pop up messages...

Hi,

I have this syntax which imports data from an excel sheet, and then runs an update on it to alter some of the data so that it conform... but when it runs, I get popup messages that say 'You are about to run an update query...' which I need to press yes, and then another window that says 'You are about to update ... records', which I also have to press yes.

Is there a way for these popups NOT to show up, and simply have it perform the actions?

    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "MigData", TxtFilename, True
    DoCmd.OpenQuery "Update_MigData"


 
Old February 20th, 2008, 12:20 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yes.

DoCmd.SetWarnings False
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "MigData", TxtFilename, True
DoCmd.OpenQuery "Update_MigData"
DoCmd.SetWarnings True

This turns these types of warnings off and on. Remember to turn them back on at the end of your subs.

Did that help?

mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old February 21st, 2008, 12:48 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey,

Thank you that worked great...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2000 pop-up messages? cjdphlx Access VBA 1 May 11th, 2005 02:11 PM
open a new pop-up from a pop-up crmpicco Javascript How-To 1 January 18th, 2005 10:48 AM
Prevent Submit Twice Joeboy General .NET 7 September 1st, 2004 10:12 AM
"Prevent User " javauniverse Pro VB Databases 3 January 9th, 2004 05:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.