Solved

Do not want to show warning

Posted on 2011-02-22
3
565 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
3 Comments
 
LVL 28

Accepted Solution

by:
omgang earned 250 total points
Comment Utility
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 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 250 total points
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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 …

771 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

11 Experts available now in Live!

Get 1:1 Help Now