Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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
  #1 (permalink)  
Old September 28th, 2007, 12:44 PM
Authorized User
 
Join Date: Sep 2007
Location: , , USA.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default RunSql action

Hi,

I have a command button on a form and when the user clicks it, a macro is fired which imports a spreadsheet to a table (TransferSpreadsheet action).
What i want is if there already is some data in the table, it should be deleted. So i added the 'RunSQL' action before the 'TransferSpreadsheet' action.
It does the work but i don't want the "Do u want to delete row(s)" message to pop up before the user. Is that a way to do that ?

Thanks

  #2 (permalink)  
Old September 28th, 2007, 01:24 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

DoCmd.SetWarnings False

DoCmd.RunSQL ...

DoCmd.SetWarnings True

Did that help?



mmcdonal


Similar Threads
Thread Thread Starter Forum Replies Last Post
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
Docmd.runsql anne.burrows VB How-To 2 October 25th, 2006 08:21 AM
RunSQL (insert into... ) HELP Kevinsharrison Access VBA 5 April 26th, 2005 11:17 AM
docmd.runsql "select RodMead Access VBA 2 July 31st, 2004 02:55 PM
Help with DoCmd.RunSQL command ricmar Access VBA 3 July 21st, 2004 03:32 PM





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