Solved

DBGrid_ BeforeUpdate

Posted on 1998-03-25
3
428 Views
Last Modified: 2008-03-10
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?
0
Comment
Question by:nima
[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 6

Expert Comment

by:clifABB
ID: 1459783
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
 

Author Comment

by:nima
ID: 1459784
I'm sorry but it didn't work.
0
 

Accepted Solution

by:
girsu earned 50 total points
ID: 1459785
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

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

738 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