Solved

Do not want to show warning

Posted on 2011-02-22
3
595 Views
Last Modified: 2012-06-21
I have a form that I use a click event on. It works fine. The only thing is that it gives the user a warning that they are going to update x records. Do they want to? I really don't want to show this warning. What/where can I put in the following code:

Dim strSQL As String
strSQL = "UPDATE RunningAmounts SET RunningAmounts.Print = False WHERE RunningAmounts.ClaimNumber='" & Me.ClaimNumber & "';"
DoCmd.RunSQL strSQL
0
Comment
Question by:4charity
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
omgang earned 250 total points
ID: 34955440
Dim strSQL As String
DoCmd.SetWarnings False
strSQL = "UPDATE RunningAmounts SET RunningAmounts.Print = False WHERE RunningAmounts.ClaimNumber='" & Me.ClaimNumber & "';"
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True

OM Gang
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 250 total points
ID: 34955451
or  use this

Dim strSQL As String
strSQL = "UPDATE RunningAmounts SET RunningAmounts.Print = False WHERE RunningAmounts.ClaimNumber='" & Me.ClaimNumber & "';"

currentdb.execute strsql,dbfailonerror
0
 

Author Closing Comment

by:4charity
ID: 34955559
Thanks!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

739 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