Solved

DBGrid_ BeforeUpdate

Posted on 1998-03-25
3
417 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
3 Comments
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
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
Comment Utility
I'm sorry but it didn't work.
0
 

Accepted Solution

by:
girsu earned 50 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now