Hello friends,
Please, I want your help about the following Code
it is about Update Query (Query1) which update a field of a table by a value ( 1 for example) in the range when a condition of another field met and give message"That's Good"
Put when the condition not met (the query not update any thing Or update 0 Rows) give message "That's wrong"
The problem is
When the condition not met the error message not appear.What is the wrong in this code?
I want your help to solve this problem
Any help will be really appreciated
Thanks a lot
Please, I want your help about the following Code
it is about Update Query (Query1) which update a field of a table by a value ( 1 for example) in the range when a condition of another field met and give message"That's Good"
Put when the condition not met (the query not update any thing Or update 0 Rows) give message "That's wrong"
The problem is
When the condition not met the error message not appear.What is the wrong in this code?
I want your help to solve this problem
Any help will be really appreciated
Thanks a lot
Code:
Private Sub Button1_Click()
On Error GoTo err:
SetOption "Confirm Action Queries", False
Dim stDocName As String
stDocName = "Query1"
DoCmd.OpenQuery stDocName, acNormal, acEdit
MsgBox "That is True"
Exit Sub
err:
MsgBox "That is wrong"
End Sub