Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DBGrid_ BeforeUpdate

Posted on 1998-03-25
3
Medium Priority
?
435 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 150 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

719 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