Deselect chk boxes

SheaLee

Registered User.
Local time
Yesterday, 16:27
Joined
Dec 22, 2005
Messages
40
I have a button when you click it, it runs a append query to change all true check boxes back to false
my problem is after it runs the append query the user see a long error message, then to see the check boxes change .....you have to go back and click the button again.....not very pretty
here is what I have

Private Sub btnDeselectAll_Click()

DoCmd.OpenQuery "qupdNotificationSelectionNo"
Me.Form.Refresh


End Sub
Thanks in advance
 
Hi SheaLea,
To stop the warning messages, use
docmd.set warnings = false
at the beginning of your code and
docmd.setwarnings = true
at the end of your code and in the error trap.

Depending on the situation, you may be able to use echo off to stop any repainting then echo on after your code followed by a refresh or repaint.

Its late and I'm tires so if any of this is wrong or inappropriate, I apologize in advance. :)

HTH & Regards
 
Thanks Keith, I'm so not good a vb, I'm going to try to accomplish this by using a Macro....I'm taking the easy-way-out Have a wonderful and safe wknd
 
Just change:
DoCmd.OpenQuery "qupdNotificationSelectionNo"
to:
CurrentDB.Execute "qupdNotificationSelectionNo", dbFailOnError
and no warning messages are shown.
 

Users who are viewing this thread

Back
Top Bottom