Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Do not want to show warning

Posted on 2011-02-22
3
Medium Priority
?
602 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 1000 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 1000 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

722 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