Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 19th, 2008, 12:54 PM
Friend of Wrox
 
Join Date: Mar 2004
Location: Ottawa, , Canada.
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"


Reply With Quote
  #2 (permalink)  
Old February 20th, 2008, 12:20 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old February 21st, 2008, 12:48 PM
Friend of Wrox
 
Join Date: Mar 2004
Location: Ottawa, , Canada.
Posts: 139
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey,

Thank you that worked great...

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:11 AM.


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