Solved

Do not want to show warning

Posted on 2011-02-22
3
600 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

636 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