Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel Add Record in DataGrid
Message
 
 
To
29/08/2000 11:12:41
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00408290
Message ID:
00410302
Views:
18
>Chad:
>
>A little later, but maybe I can still help you....
>First, Install VB SP4, that fix many DataGrid's bugs.
>I had your problem too. How to Cancel Add Record in DataGrid?. Well, this is my solution:
>
>Private Sub dbg_LostFocus()
> If dbg.AddNewMode = dbgAddNewPending Then
> dbg.DataChanged = False
> dbg.ReBind
> End If
>End Sub
>
>Like dbg.DataChanged = False set dbg.AddNewMode to dbgNoAddNew, you could validate your required fields on LostFocus. If data doesn´t agree with your specifications then set dbg.DataChanged = False and AddNew operation is canceled.
>When click on another record...?. Try BeforeUpdate, AfterUpdate and RowColChange. I don't have tried that. Maybe it works.
>
>German

Thanks, But I have it all working now.
Previous
Reply
Map
View

Click here to load this message in the networking platform