Solved

Do not want to show warning

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
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…

821 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