DBGrid_ BeforeUpdate

Hi!
This is my problem:
I use a dbgrid and in dbgrid_beforeupdate I validate my
data .
if X="" then
 msgbox "Please do something!!"
 cancel=True
 exit sub
end if
At runtime after this message I see another dbgrid message
like this;
"This action was cancelled by an association object."
How can I cancel this message?
nimaAsked:
Who is Participating?
 
girsuConnect With a Mentor Commented:
This masseg box comes form DBGrid Errors yocan please this code in your app. and check.

Private Sub dbGrid1_Error(Index As Integer, ByVal DataError As Integer, Response As Integer)
    If DataError = 16389 Then
        Response% = vbDataErrContinue
    End If
End Sub

0
 
clifABBCommented:
I've run across this problem on many occassion.  The only way I've found to solve this was to set DBGrid.DataChanged = False with the Cancel = True.
0
 
nimaAuthor Commented:
I'm sorry but it didn't work.
0
All Courses

From novice to tech pro — start learning today.